Learn the fundamentals of GraphQL including variables, fragments, alias, queries, and mutations.

Table of Contents

  • GraphQL in GitHub APIs
  • Arguments in GraphQL query
  • Alias in GraphQL
  • Fragments in GraphQL
  • Variables in GraphQL
    • How to define non-null values for variables in GraphQL
    • How to define default values for variables in GraphQL
  • Directives in GraphQL
  • Root Object types in GraphQL - Query and Mutation
  • Conclusion

This article is part II of the series on Exploring GraphQL. In this article, we are going to learn the fundamental concepts used in writing GraphQL queries. We will learn how to fetch particular records by passing arguments in a query at the root and nested levels, how to fetch multiple instances of the same field but with different arguments using Alias and how to write reusable units of a query using Fragments. We will also learn how variables can be used to write dynamic queries and how Directives are used in creating a result-set based on some condition. We will also explore one more object type called Mutation later in the article.

#graphql #api #programming #developer #web-development

Fundamentals of GraphQL
1.85 GEEK