Skip to content

omaxlive/GraphQLClient

Repository files navigation

GraphQL Project

./server/

  • Run dev server npm run dev

  • Find the GraphQL Playground in http://localhost:4000/

Simple Query

query {
  getAuthors {
    author
  }
}

Query with input

query {
  getPosts(input: {
    author: "author 2"
  }) {
    title
    detail
  }
}

Using Variables as input

query getPosts($input: PostInput!) {
  getPosts(input: $input) {
    title
    detail
  }
}

Variable declararion in Playground

{
  "input": {
    "author": "author 1"
  }
}