/graphQL-test-nodejs

Testing GraphQL in Nodejs

Primary LanguageJavaScript

  1. Run devstart
  2. Open localhost:5000/graphql

Queries

{
  book(id: 1) {
    id
    name
    author {
      name
    }
  }
}
{
  books {
    id
    name
    author {
      id
      name
    }
  }
}
query{
  authors{
    id
    name
    books{
      id
      name
    }
  }
}

Mutations

mutation{
	addBook(name:"test book" authorId: 123){
    authorId
  }
}
mutation{
	addAuthor(name:"test author 12345"){
    name
  }
}