天天看点

[GraphQL] Filter Data Based on Query Arguments with GraphQL

With GraphQL, every field and nested object can have a set of arguments which can be used to request very specific data from a GraphQL API. In this lesson, we will pass arguments to the GitHub API inline and as query variables.

We can named query:

We can pass in arguements into query:

The same as function in Javascript, we can give default params and use it in query:

[GraphQL] Filter Data Based on Query Arguments with GraphQL

继续阅读