Updating our Schema
Explore how to update a GraphQL schema by adding User types, defining queries like getUser, and creating mutations such as addUser, all integrated with PostgreSQL in a Deno application. Understand how to connect to a Postgres database, define resolvers, and test the endpoint to manage user data effectively.
We'll cover the following...
We'll cover the following...
User type and input
We’ll use a schema with only the User type. Let’s start by adding this type and then creating our resolvers. We’ll add the definition of the following types:
User queries
In this section, we’ll define our queries. In particular, we’ll define the getUser query that returns a given user from their associated id. As the first step, let’s add the query to our types:
...