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

Updated apollo-server-express version breaks schema assignment. #329

Open
joaovpmamede opened this issue Sep 8, 2019 · 5 comments
Open

Comments

@joaovpmamede
Copy link

I had issues running master with a project that was built with the latest npm released version (v0.3.4-beta.1).
After a couple of tests I've decided to downgrade the apollo-server-express from 2.8.1 to 2.6.2 and everything started working again.

From my understanding the issue could be here. I'm not sure but I don't think that this new version allows to set the schema after the instance has been created (new schema initialization/creation).

Two options would be to:

  1. Create a new server instance on schema changes (which in terms of performance could not be great).
  2. Investigate apollo-gateway (not sure if it makes sense here tbh) because it seems that allows to update the schema.
@irisjae
Copy link

irisjae commented Sep 11, 2019

+1!

@irisjae
Copy link

irisjae commented Sep 11, 2019

Super super worried XD!!! The schemas were totally empty. I isolated it to the same issue, and tried modifying prime to use apollo's gateway, when I found your fix, and downgrading did it!

@birkir
Copy link
Owner

birkir commented Sep 24, 2019

This is the hack I made!

externalServer.schemaDerivedData = externalServer.generateSchemaDerivedData(
externalServer.schema
);

@AienTech
Copy link

still facing this issue from time to time, is there a fix for it? or any updates?

@AienTech
Copy link

This eventually got fixed (temporarily) by downgrading all apollo-server-core versions to 2.6. For which I used package resolutions.

This change also seems to come from a refactor that is done inside the apollo server itself, thus not being an implementation issue of primecms. The only issue I'd say is here, is that prime packages aren't updated for a long time, which is eventually leading to incompatibility issues for newcomers.

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

4 participants