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
What problem does this feature proposal attempt to solve?
At the moment it seems that lighthouse is not able to resolve entities reference for types that are reserved PHP words out of the box.
For instance we are using this type Class in our graph which we didn't have problem with at first, but now that we need EntityReference resolver this is a problem because lighthouse is looking for a class with the same __typename which is not possible in PHP class Class {}.
Which possible solutions should be considered?
Option 1.
Entity reference resolver could be suffixed by Resolver or ReferenceResolver to allow fo this to work.
The text was updated successfully, but these errors were encountered:
Maxwell2022
changed the title
Support GraphQL types that are PHP reserved words
[Federation] Support GraphQL types that are PHP reserved words
Jul 10, 2024
spawnia
changed the title
[Federation] Support GraphQL types that are PHP reserved words
Allow GraphQL types named like PHP reserved keywords in federation entity resolver
Jul 11, 2024
Does any passed in __typename have to be present as a type in the schema 100% of the time? If so, we could add a mapping at the schema level through a directive, such as:
What problem does this feature proposal attempt to solve?
At the moment it seems that lighthouse is not able to resolve entities reference for types that are reserved PHP words out of the box.
For instance we are using this type
Class
in our graph which we didn't have problem with at first, but now that we needEntityReference
resolver this is a problem because lighthouse is looking for a class with the same__typename
which is not possible in PHPclass Class {}
.Which possible solutions should be considered?
Option 1.
Entity reference resolver could be suffixed by
Resolver
orReferenceResolver
to allow fo this to work.Option 2.
Another solution would be to provide a mapping in the lighthouse configuration
Option 3.
Another option would be to use a custom
EntityResolverProvider
(we went down this path)The text was updated successfully, but these errors were encountered: