In this tutorial, you’ll learn how to build an idiomatic GraphQL server entirely from scratch. You are going to use the following technologies:
graphql-yoga: Fully-featured GraphQL server with focus on easy setup, performance & great developer experience. It is built on top of Express, apollo-server, graphql-js and more.
Prisma: Prisma replaces traditional ORMs. Use the Prisma client to implement your GraphQL resolvers and simplify database access
GraphQL Playground: “GraphQL IDE” that allows to interactively explore the functionality of a GraphQL API by sending queries and mutations to it. It’s somewhat similar to Postman which offers comparable functionality for REST APIs. Among other things, a GraphQL Playground…
… auto-generates a comprehensive documentation for all available API operations.
… provides an editor where you can write queries, mutations & subscriptions, with auto-completion(!) and syntax highlighting.
λ prisma deploy
? Set up a new Prisma server or deploy to an existing server? Demo server
? Choose the region of your demo server nikolaj-ivancic-fde3e6/demo-eu1
? Choose a name for your service hackernews-node
? Choose a name for your stage dev
Written endpoint `https://eu1.prisma.sh/nikolaj-ivancic-fde3e6/hackernews-node/dev` to prisma.yml
Creating stage dev for service hackernews-node √
Deploying service `hackernews-node` to stage `dev` to server `prisma-eu1` 1.1s
Changes:
Link (Type)
+ Created type `Link`
+ Created field `id` of type `ID!`
+ Created field `createdAt` of type `DateTime!`
+ Created field `description` of type `String!`
+ Created field `url` of type `String!`
Applying changes 2.1s
Your Prisma GraphQL database endpoint is live:
HTTP: https://eu1.prisma.sh/nikolaj-ivancic-fde3e6/hackernews-node/dev
WS: wss://eu1.prisma.sh/nikolaj-ivancic-fde3e6/hackernews-node/dev
You can view & edit your data here:
Prisma Admin: https://eu1.prisma.sh/nikolaj-ivancic-fde3e6/hackernews-node/dev/_admin
In this tutorial, you’ll learn how to build an idiomatic GraphQL server entirely from scratch. You are going to use the following technologies:
GraphQL Playground: “GraphQL IDE” that allows to interactively explore the functionality of a GraphQL API by sending queries and mutations to it. It’s somewhat similar to Postman which offers comparable functionality for REST APIs. Among other things, a GraphQL Playground…
Section adding a database, command
prisma deploy
results with:Additional reading
GraphQL Server Basics: GraphQL Schemas, TypeDefs & Resolvers Explained GraphQL Server Basics: Demystifying the info Argument in GraphQL Resolvers