...

/

Dynamic Query Using Directives

Dynamic Query Using Directives

Learn about dynamic GraphQL queries that use directives.

GraphQL directive

In the last lesson, we learned how to utilize GraphQL variables to filter pizzas based on a keyword entered by the user. Imagine now that our application has grown in popularity. Each pizza now requires a summary and a more thorough description , which also needs additional fields of data. We need a method to dynamically modify the structure and layout of our queries. ...