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.

[Bug] Error rendering query when GraphQL body includes a comment

See original GitHub issue
  • Insomnia Version: Version 5.16.0 (5.16.0.2017)
  • Operating System: OSX 10.13.3 (17D102)

Details

When trying to render the following query (at any or an empty target endpoint) the insomnia client fails:

# query {
#	viewer {
#		serviceConsents {
#			id
#			externalVehicleId
#			externalUserId
#			serviceId
#			vehicleId
#			scope
#			startTime
#			endTime
#		}
#	}
#}

query {
	services {
		id
		name
		scope
	}
}

The error can be seen here: https://i.imgur.com/ENDSB5u.png

But writes:

Render error
> unexpected end of comment

Caused by the following field
> Request.body.text

This is obviously not correct so there appears to be a bug in the query parsing, as the above query, including the comment is compleatly valid, and the linter picks it up perfectly? Perhaps do not try to strip comments to begin with, graphiql doesn’t either?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
NinnOgToniccommented, Apr 26, 2018

Or perhaps not, i think i misunderstood what that issue actually ment, i.e. just on send, render it prettified, rather than an “auto format on send”. None the less, i will keep the work around in mind.

0reactions
stale[bot]commented, Jun 25, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling - Apollo GraphQL Docs
GRAPHQL_VALIDATION_FAILED. The GraphQL operation is not valid against the server's schema. ; BAD_USER_INPUT. The GraphQL operation includes an invalid value for ...
Read more >
GraphQL Data showing in console but doesnt render in React
The word "bar" is not even being rendered, which means that it's recognizing that there is an array of data and the data...
Read more >
[GraphQL] Implement basic comment querying in the Graph
Problem /Motivation. It should be possible to. Select a comment by its UUID; Paginate through results according to the Relay connection ...
Read more >
Learn Sangria - Sangria - Scala GraphQL Implementation
It has a lot of nice introduction videos. Query Parser and Renderer. Example usage: import sangria.ast.Document import ...
Read more >
GraphQL API style guide - GitLab Docs
All GraphQL queries are directed to a single endpoint ... multiple parent nodes because it results in an N+1 query problem and there...
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