Getting started with graphql – GraphQL Query Language (GQL)

Instead of defining URL endpoints for each data resource, in GraphQL you define a single endpoint that accepts GraphQL queries. Unlike traditional database query languages, GraphQL Query Language (GQL) is a projection of data returned by a root level query. The GraphQL schema will define the data model and root level queries and mutations. GQL executes those queries and defines what data to return.

Query for All Film Titles from Star Wars Schema

Star Wars data query for allFilms with a projection of only the title
GraphiQL Query

Query for Planet Residents to Star Wars film "A New Hope"

enter image description here
GraphiQL Query

Notice how the root query film() takes in the id parameter of the film "A New Hope" and the projection from GQL returns the title, planets connected to the film, and then resident names of the planets. Check out the Star Wars GraphiQL site to experiment with querying in GraphQL.

if you want to reproduce, please indicate the source:
Getting started with graphql – GraphQL Query Language (GQL) - CodeDay