
Dan defines GraphQL as a declarative query language, explains how GraphQL works both on the client and the server side. In order to create a GraphQL server, a schema must first be created using a schema definition language, or SDL, and reviews the basic parts of a schema.
Here we learn how to set up our graphql project and we go over the project that we will be doing during the course.
Dan defines query types as object types, and demonstrates how to build a query. We define resolvers as functions responsible for returning values for fields on a type, and explains that to create a server with GraphQL a query type with a field and a resolver for that field are needed.
Dan explains that arguments allow clients to pass variables along with queries, and that they can be used in resolvers to get data. Arguments must be defined in the schema, but can be added to any field.
Dan explains that a mutation is a type on a schema that defines operations clients can perform to create, update, or delete data.
Dan explains that enums are a set of discrete values that allow limiting a field to a few different options, and demonstrates how to add an enum to a type.
Dan explains that in GraphQL, APIs are set of nodes linked to other nodes, and defines a relationship to be adding a type as a field value on another type.
Dan demonstrates how to add authentication to an Apollo server, and explains that the level of authentication depends on what needs to be protected within the schema. Request level caching to avoid querying the database each time is also discussed.
Dan defines GraphQL as a declarative query language that clients can use to ask an API for the data needed, and explains how this course will focus on using GraphQL with React on the front end.
Dan defines operation names as unique names for the GraphQL client side query and mutation operations. Operation names are used by tools like the GraphQL playground to reference different operations. How to write a query operation in GraphQL by declaring a variable, and setting a variable's type and value.
Learn everything you need to create a GraphQL API on the server in Node.js with Apollo Server. You'll start with a schema that includes type definitions, queries, and mutations. Then, build the resolvers needed to get the values for the API. Finally, move onto advanced features like interfaces and unions, all the way down to how relationships work in resolvers.
Learn to use GraphQL on the client-side using React with Apollo Client. In this course, you'll use queries and mutations to fetch and update GraphQL API data. You'll go further with variables, inputs, aliases on fields. Then attach your queries and mutations to React and interact with an Apollo Server using React hooks to build amazing things with React and GraphQL!