You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've deployed our GraphQL schema to production (though only for internal use) before enabling this plugin. It would be useful to have a graceful migration strategy, and I see two options:
Add support to the plugin for a both / only option, and use both to expose the old names and the new names. Deploy this to production, migrate all our consume code to use the new APIs, deploy that, and wait a week for old code to evaporate from production systems. Then switch the plugin to only and deploy that.
Deploy a second GraphQL API to /graphql2, that uses the same postgraphile configuration as /graphql but has this plugin installed. Then migrate all consumer clients to use /graphql2, deploy that, wait a week for legacy production code to evaporate, then remove /graphql.
I'm leaning towards the second option, since it's something we can do without depending on changes to this plugin.
Thoughts?
The text was updated successfully, but these errors were encountered:
I’ve thought about this in the past and unfortunately I think it’d be a lot of work for PostGraphile to support both concurrently due to the way the schema is built currently. I think your latter option is good, but I’d expose both over the same endpoint and use a version header of some kind to indicate which to use. If you’ve the performance space to spare (I expect so?) it would actually be possible to validate the incoming query against the latest schema and if it fails pass it up the tree of older schemas, this would mean the client doesn’t need to know which version or even that there are multiple versions. Probably good to add a header or similar to warn though. And obviously metrics so you know when it’s safe to disable.
We've deployed our GraphQL schema to production (though only for internal use) before enabling this plugin. It would be useful to have a graceful migration strategy, and I see two options:
both
/only
option, and useboth
to expose the old names and the new names. Deploy this to production, migrate all our consume code to use the new APIs, deploy that, and wait a week for old code to evaporate from production systems. Then switch the plugin toonly
and deploy that./graphql2
, that uses the same postgraphile configuration as/graphql
but has this plugin installed. Then migrate all consumer clients to use/graphql2
, deploy that, wait a week for legacy production code to evaporate, then remove/graphql
.I'm leaning towards the second option, since it's something we can do without depending on changes to this plugin.
Thoughts?
The text was updated successfully, but these errors were encountered: