graphql-php icon indicating copy to clipboard operation
graphql-php copied to clipboard

Do not store standard types statically but keep them on the Schema instead

Open ruudk opened this issue 3 years ago • 1 comments

When working with 2 schemas that have different standard types this becomes problematic.

For example, I have a schema that uses a custom ID type, but the other wants to use the default.

I can imagine this is not easily possible currently because of the way types are resolvable without a Schema (#1149).

ruudk avatar Jun 21 '22 14:06 ruudk

This is a large breaking change, so I will plan this for v16.

Until then keep in mind that while static, the standard types can be manipulated dynamically. Unless you need to serve both schemas in the same execution context, you can work around this issue.

spawnia avatar Jun 22 '22 07:06 spawnia

See issue https://github.com/webonyx/graphql-php/issues/1424 for a possible solution

ruudk avatar Aug 12 '23 07:08 ruudk