Thief of Wealth

Error: Query root type must be provided.

 

에러는 graphql 에서 root query가 없기 때문이다.

 

에러가 떴을시에 grapqhl 문구에는 아마도 사용자 정의 type과 type Mutation 만이 정의되어 있을 것이다.

 

이 경우는 필요한 type Query를 만들어주면 되나 굳이 Query가 필요없는 경우엔 

 

type Query {
    dummy: String
}

 

으로 무의미한 더미 쿼리를 만들어주어서 해결할 수 있다.

profile on loading

Loading...