Your first query — GraphQL · NestJS

Serve the cats as a GraphQL schema: the Apollo driver generating the schema from decorated classes, an object type whose fields say exactly what they are, and a resolver with two queries.

What you will learn

Read the theory for Your first query

All GraphQL lessons

All NestJS courses

loading types…

What you'll learn

  • Explain what GraphQL changes from REST: one endpoint, a typed schema, and the client choosing the fields it gets
  • Configure GraphQLModule with the Apollo driver, the schema generated in memory from code, GraphiQL and introspection, and know why production turns the last two off
  • Describe an object type with @ObjectType() and @Field(), and state Int, String and nullability exactly
  • Answer queries with a @Resolver's @Query() methods, taking typed arguments with @Args()