Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Causes validation errors with GraphQL.js v15 #14

Closed
jaydenseric opened this issue May 25, 2020 · 2 comments
Closed

Causes validation errors with GraphQL.js v15 #14

jaydenseric opened this issue May 25, 2020 · 2 comments

Comments

@jaydenseric
Copy link

GraphQL.js v15 no longer tolerates numbers being followed immediately with letters:

This package compresses field arguments like this:

{
  a(b: 1, c: true)
}

To this:

{a(b:1c:true)}

The 1c creates a query validation error is it is now invalid GraphQL syntax.

Until this is resolved, graphql-query-compress is unsafe to use 😭

@rse
Copy link
Owner

rse commented May 25, 2020

Sorry, I cannot repeat this problem:

$ cat sample.js 
const compress = require(".")
let query = `{
    a(b: 1, c: true)
}
`
query = compress(query)
console.log(query)
$ node sample.js 
{a(b:1,c:true)}

Are you sure the problem is introduced by graphql-query-compress itself in your case?

@jaydenseric
Copy link
Author

You're right! Sorry for the noise; here is the real issue: frontendr/babel-plugin-transform-compress-graphql#4 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants