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

gatsby: Don't use fork of relay-compiler #11536

Closed
freiksenet opened this issue Feb 4, 2019 · 9 comments
Closed

gatsby: Don't use fork of relay-compiler #11536

freiksenet opened this issue Feb 4, 2019 · 9 comments
Assignees
Labels
help wanted Issue with a clear description that the community can help with. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: GraphQL Related to Gatsby's GraphQL layer type: bug An issue or pull request relating to a bug in Gatsby
Projects

Comments

@freiksenet
Copy link
Contributor

Description

When having literal enums that have non-string values (eg ImageCropFocus), Relay fails to print the query.

Expected result

Should print normally.

Actual result

Fails with exception.

Reported upstream in facebook/relay#2633.

We should consider downgrading back to relay-compiler 1.

@freiksenet freiksenet added type: bug An issue or pull request relating to a bug in Gatsby status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. labels Feb 4, 2019
@gatsbot
Copy link

gatsbot bot commented Feb 25, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Feb 25, 2019
@freiksenet
Copy link
Contributor Author

Fixed in latest relay, should be tested and used.

@freiksenet freiksenet added not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Mar 4, 2019
@freiksenet
Copy link
Contributor Author

Not fixed in Relay, we are still using Relay fork. Modifying the issue to be about that.

@freiksenet freiksenet changed the title Literal enums in queries that resolve to non-strings break Relay Compiler gatsby: Don't use fork of relay-compiler Jun 25, 2019
@freiksenet freiksenet added this to To prioritize in OSS Roadmap via automation Jun 25, 2019
@m-allanson
Copy link
Contributor

m-allanson commented Jul 1, 2019

Should this switch from:

"@gatsbyjs/relay-compiler": "2.0.0-printer-fix.2",

to:

"relay-compiler": "5.0.0",

or a different version?

See here for a similar PR if anyone would like to take this on.

@m-allanson m-allanson added help wanted Issue with a clear description that the community can help with. effort: low labels Jul 1, 2019
@m-allanson m-allanson moved this from To prioritize to Prioritized in OSS Roadmap Jul 1, 2019
@freiksenet
Copy link
Contributor Author

Last time we patched this, it broke our builds because Relay regressed. I'll assign myself and try it again when I have time.

@freiksenet freiksenet self-assigned this Jul 10, 2019
@m-allanson m-allanson added this to To do in "Snow Leopard" fixes via automation Jul 15, 2019
@m-allanson m-allanson removed this from To do in "Snow Leopard" fixes Jul 16, 2019
@ThewBear
Copy link
Contributor

Currently, it shows security alert with mem < 4.0.0

@freiksenet
Copy link
Contributor Author

So far this is impossible, because relay-compiler has completely broken compatibility with Gatsby, eg by not supporting complex input types. We will keep using forked relay-compiler. https://github.com/facebook/relay/blob/master/packages/relay-compiler/core/RelayParser.js#L1392

I'll release an update to forked compiler with this library fixed.

Closing this issue because we will keep using fork in near future.

OSS Roadmap automation moved this from Prioritized to Done Nov 20, 2019
@sibelius
Copy link

sibelius commented Dec 3, 2019

now it does support complex input types

facebook/relay@5da3be0

@josephsavona
Copy link

@freiksenet Any interest in re-evaluating? I'm not sure exactly when you forked, but we've continually worked to improve Relay Compiler performance (especially in the last 6 months) that could potentially benefit Gatsby users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: GraphQL Related to Gatsby's GraphQL layer type: bug An issue or pull request relating to a bug in Gatsby
Projects
No open projects
OSS Roadmap
  
Done
Development

No branches or pull requests

7 participants