Skip to content

abhisawesome/GraphQl-Basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To run

Run the command in terminal

npm run dev

Sample input query

query{
  getAllAuthors{
    name,id
  }
}
query{
  result : getAuthorWithId(id:1){
    author_name: name
  }
}

mutation{
  result: insertAuthor(id:4,name:"Author 4"){
    id,
    name
  }
}

Schema generated

type Query {
  getAllAuthors: [Author]
  getAuthorWithId(id: Int): Author
}

type Author {
  id: Int
  name: String
}

type Mutation {
  insertAuthor(id: Int, name: String): [Author]
}

About

Basics of Graphql (Query and mutation)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published