🚀 Adding directives to the schema in code-first GraphQL servers

— 1 minute read

I wrote a new article for my series on designing a GraphQL server for the LogRocket block:

Adding directives to the schema in code-first GraphQL servers

This time, I explore several topics:

  • A strategy to add directives to the schema when there is no SDL
  • Decoupling the query into 2: requested and executable
  • A potential solution for implementing the flat chain syntax
  • Adding directives to the schema by configuration, not code
  • Server-side field aliases

Now that the GraphQL API for WordPress has been released, I can use it to demonstrate the IFTTT feature, to add directives to the schema by configuration, not code:

Adding directives by configuration in the GraphQL API for WP
Adding directives by configuration in the GraphQL API for WP

As always, I hope you enjoy it!