Skip to content
Discussion options

You must be logged in to vote

Hey @deadcoder0904 👋, this is not a bug.

Selecting which properties you want to query from your db is completely independent from your GraphQL schema. Your GraphQL schema will not ever change based on the field you query from your database.

Instead, your GraphQL schema is a contract that your database queries need to fulfill.

In fact, the red squiggly lines are telling you that you are not fulfilling that contract as your resolver expect you to return something of type Blog, which is, an object with an id and title property. But you are only returning a field title.

I think what you're trying to achieve is to optimize your database queries based on what the user query from a GraphQL persp…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Weakky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1158 on July 08, 2020 09:23.