Skip to content

MarkNjunge/graphql-yoga-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphql-yoga sample

A sample GraphQL Server built using graphql-yoga.
The sample shows how to implement queries, mutations, subscrptions as well as accessing headers.

Live version

Installation

git clone https://github.com/MarkNjunge/graphql-yoga-sample.git

yarn

yarn start

GraphQL Playground will be avaiable at localhost:3000/playground.
The GraphQL endpoint will be localhost:3000/graphql

Sample queries

Query

query {
  hello(name:"Mark")
}

# Returns data from a header
query {
  header(headerName:"Authorization")
}

Mutation

mutation {
  changeCount(value:10)
}

Subscrption

subscription {
  helloSub{
    total
    greeting
  }
}

About

A sample GraphQL Server built using graphql-yoga.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published