Extend type support in non-federated types #2522
Replies: 2 comments
-
Hi @SirensOfTitan! Thanks for the suggestion! 😊 Would you need to import FooMutation in your schema? At the moment all types have to be explicitly declared on the schema, either by using them as types of fields or by passing them to the I don't think we might allow Strawberry to automatically find types[1], as we support creating multiple schemas in a single project. If we don't allow finding automatic types, then maybe allowing to use extend to extend types, might not be the best DX? What do you think? [1] but this could be something done by a framework/helper built on top of Strawberry maybe :D |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
One fairly nice feature in the GraphQL spec is the capacity to extend types. This is particularly worthwhile when working with
Mutation
, as you can co-locate particular mutations with the rest of their GraphQL definitions. I've noticed theextends
field sprinkled around in tests for federated features here, but I was wondering if there is or any support is planned for this feature.For example, I could have a stub file, mutation.py:
... and in say, foo.py:
Beta Was this translation helpful? Give feedback.
All reactions