extend transform allows you to extend the schema of the source directly on the source level. But this might cause inconsistency if the schema heavily relies on that schema's existing structure. This transform can be used for the data sources that return fixed results. For example, OpenAPI and JSON Schema handler are good examples for this kind of sources while Postgraphile and GraphQL handlers aren't because they rely on their existing structure. The resolvers added by this transform accesses directly to
context of that schema, so you cannot use
selectionSet (actually you shouldn't, because this is not a root level transform).
Note: This transform is not able to access other sources, it can be only used in the source level.
Please DO NOT use this transform unless you know what you're doing! We strongly recommend you to extend the schema using
additionalResolversas described in Extend Schema part in this documentation.
Add the following configuration under the source configuration;
You can extend the existing types in
And define resolvers for those types;