Skip to content

adhywiranata/ngopract-graphql-ft-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ngopract GraphQL feat ExpressJS

✨ Super simple guide on building GraphQL server using ExpressJS

Getting Started

yarn add graphql express graphql-express

Start Server and Serve Client

yarn start

Start Server and Serve Client (Development)

yarn dev

Ngopract Releases

Ngopract release iteration consists of several branches (01-, 02-, etc) to ensure the best "ngopract" experience.

sample query

query {
  students {
    name
    parentName
  }
}

sample mutation query

mutation CreateStudent($newStudent: NewStudentInput!) {
  createStudent(input: $newStudent) {
    name
    age
    score
  }
}

query variables for mutation

{
  "newStudent": {
    "name": "wawan",
    "age": 18,
    "score": 20,
    "parentName": "dodo"
  }
}
  • 03- GraphQL Query, the end result is the same as step 01, but built without using buildSchema method and use GraphQLObject instead.

  • 04- GraphQL Query and Mutation, the end result is the same as step 02, but built without using buildSchema method and use GraphQLObject instead.

  • 05- GraphQL Async Query, continuation on previous step, with asynchronous "data fetching" using simple setTimeout

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published