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

Syntax error when inserting empty variables #117

Closed
d-winter opened this issue Sep 20, 2016 · 3 comments
Closed

Syntax error when inserting empty variables #117

d-winter opened this issue Sep 20, 2016 · 3 comments

Comments

@d-winter
Copy link

I get the following Error when calling a mutation with all arguments without a value.
As soon as I set at least one variable, the mutation works.

screen shot 2016-09-20 at 15 51 55

error: syntax error at or near ")"
    at Connection.parseE (/usr/local/lib/node_modules/postgraphql/node_modules/pg/lib/connection.js:539:11)
    at Connection.parseMessage (/usr/local/lib/node_modules/postgraphql/node_modules/pg/lib/connection.js:366:17)
    at Socket.<anonymous> (/usr/local/lib/node_modules/postgraphql/node_modules/pg/lib/connection.js:105:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:177:18)
    at Socket.Readable.push (_stream_readable.js:135:10)
    at TCP.onread (net.js:542:20)
POST / 200 79.240 ms - -
@calebmer
Copy link
Collaborator

Yeah, this definetly looks like a bug, can you look at the Postgres logs and extract the bad query?

This may also be related to #108

@calebmer
Copy link
Collaborator

There’s a PR in fixing this, just need to wait for review 👍 #122

@calebmer
Copy link
Collaborator

Fix is in 1.9.3 🎉

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