Skip to content

A demo project for GraphQL Europe Workshop in Berlin. Features Prisma and Node.JS GraphQL servers.

Notifications You must be signed in to change notification settings

Makazone/graphqleu-2018-ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL Europe Workshop

Berlin, June 14 2018

Demo 3

In this demo we will build a Node.JS server, connect it to Prisma and implement all sorts of resolvers by using prisma bindings.

Installation

# Clone the repo
git clone https://github.com/Makazone/graphqleu-2018-ws gql-eu-demo3

# Cd into it and instal deps
cd gql-eu-demo3 && yarn && yarn start

Structure

The demo consists of multiple steps. Each step is in a separate branch. You can peak (or check the solution) by doing a git checkout.

  1. master - basic GraphQL server with in-memory DB
  2. prisma-init - the starting point to integrate prisma
  3. prisma-resolvers - prisma is integrated, time to write some resolvers
  4. finish - implemented resolvers

Step 1 (you are here ^^)

Jump

Here we have a simple GraphQL Server with an in-memory DB. It uses graphql-yoga.

Sample Queries

query {
  posts(searchString: "QL") {
    id
    title
    content
    published
  }
}
query {
  post(id: "post-0") {
    id
    title
    content
    published
  }
}
mutation {
  createDraft(
    title: "GraphQL Bindings"
    content: "Reuse and compose GraphQL APIs"
  ) {
    id
    published
  }
}
mutation {
  publish(id: "post-0") {
    id
    published
  }
}
mutation {
  deletePost(id: "post-0") {
    id
    title
    content
    published
  }
}

About

A demo project for GraphQL Europe Workshop in Berlin. Features Prisma and Node.JS GraphQL servers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published