GraphQL is a declarative API query language that you can use to fetch data from a server. Facebook started its development in 2012 and open sourced it in 2015.
A GraphQL schema is nothing else than the definition of your backend API. You use a schema definition language (SDL) to define your API endpoints as types with fields. There is only ever one schema per GraphQL service in a file usually called schema.graphql The schema is not responsible for defining where data comes from […]
Things to consider when creating/changing the schema All of the following schema changes are potentially breaking changes: Removing a type or field Renaming a type or field Adding nullability to a field Removing a field’s arguments It’s easier and safer to add a new field to a schema than it is to remove an existing […]
There are many ways to send a request to fetch or change data with GraphQL, for example a raw curl requests, the graphiQL web UI or clients such as Apollo Client, Urql, React Query + GraphQL Request, React Query + Axios, React Query + Fetch API. In this article we look rather at the syntax […]
A resolver is a function that’s responsible for populating the data for a single field in your schema. It can populate that data in any way you define, such as by fetching data from a back-end database or a third-party API. If you don’t define a resolver for a particular field, Apollo Server automatically defines […]
Assume you have your GraphQL server running on localhost:3333, you have your React app setup and you are now at the point at which you want to request and manipulate data from your GraphQL server via URQL. You set up your React app to use URQL client with devtools enabled and adding a potential token […]