Add Nodes for building and executing GraphQL requests
See original GitHub issueHello!
First, I’d like to say thanks for creating this library. It’s been a tremendous help in our integration tests and we really love using it!
Opening this PR for discussion on a feature request to incorporate Nodes as part of the framework so that testing GraphQL APIs can be even easier!
For example, https://github.com/intuit/karate/blob/master/karate-demo/src/test/java/demo/graphql/graphql.feature could end up looking something like
Scenario: simple graphql request
Given request read('classpath:models/Pokemon.java')
When method query
Then status 200
just a quick stab at it - more thoughts on it once I dig into implementation further
Then the output will also be mapped to the Pokemon model and more features can be added around checking the properties there
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Building a GraphQL API – GraphQL API example
Let's start by creating a new folder for our project. Run the following command to create a directory and then cd into it....
Read more >Add Nodes for building and executing GraphQL requests #422
Hello! First, I'd like to say thanks for creating this library. It's been a tremendous help in our integration tests and we really...
Read more >Build a GraphQL app in Node.js with TypeScript and graphql ...
Js With TypeScript And Graphql-request. In this article, you will build a full-stack app using GraphQL and Node.js in the backend.
Read more >How To Set Up a GraphQL API Server in Node.js - DigitalOcean
In this tutorial, you'll make an Express API server in Node.js that serves up a GraphQL endpoint. You will also build a GraphQL...
Read more >Consume a GraphQL API Using Node - StepZen
You can send queries via Node.js without any special libraries, leveraging the standard Node HTTPS library to form a POST request.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for pointing all this out! More thoroughly read all the documentation and see the multiple references to preferring JSON to POJOs.
As an initial starting point I was able to make both libraries play together very nicely here https://github.com/chemdrew/karate/commit/34eb41184d3aba5c2a9f3f04a8e723ac714f1301
I’ll also be taking a closer look at generating from JSON. I was actually playing with the idea of making a Javascript version of Nodes that followed the same pattern with a very similar API but constructing the queries from JSON, might be moving that up in my todo list 😄
closing - and can re-open if needed in the future