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

Two servers using the same schema, configured differently - only one works #1223

Open
darvanen opened this issue Jul 22, 2021 · 4 comments
Open

Comments

@darvanen
Copy link
Contributor

darvanen commented Jul 22, 2021

I have a composable schema which defines 20-odd schema extensions.
I have two endpoints/servers configured differently (different sets of extensions) via the UI with different machine names and different paths.

After I refresh the cache, whichever server I make a request of first takes over the endpoint of the other one and it stays that way until the next cache refresh.

This doesn't occur on local where most if not all caches are turned off.

@darvanen
Copy link
Contributor Author

I think perhaps the operation result is missing a cache context for the server:

image

@darvanen
Copy link
Contributor Author

Oh damn. schema_configuration is keyed by the schema id not the server id, and it's pulling the wrong server's schema before it instantiates the plugin.

@darvanen
Copy link
Contributor Author

And that in turn appears to be because of some aggressive static caching in \GraphQL\Utils\SchemaExtender::extend

@darvanen
Copy link
Contributor Author

Nope, it wasn't that, it was within the drupal module. This PR demonstrates where the schemas are being cached without respecting the server ID. Biggest problem I see here is the server ID isn't available to the plugin base in configuration.

#1224

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

No branches or pull requests

2 participants