Skip to content

About

Basics of Graphql (Query and mutation)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

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

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages