question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Nodes for building and executing GraphQL requests

See original GitHub issue

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 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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chemdrewcommented, Jun 16, 2018

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 😄

0reactions
ptrthomascommented, Jul 9, 2018

closing - and can re-open if needed in the future

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found