Closed grxy closed 6 years ago
So I've discovered the stitching option for data sources. Digging into that to see if it will work for my use case.
This should be done with stitching. I've never created an actual working example for this, but you can see the outline of what it looks like in this comment. https://github.com/gramps-graphql/gramps/issues/2#issuecomment-341153995
The first data-source should be a peerDependency
of the second data-source (instead of using the requires
property in the example) If you can provide more concrete details or the example (or better yet source code) I'd be happy to help further
@ecwyne I was able to set up extending correctly from within the stitching config. Thanks for pointing me in the right direction.
In my base data source, I have created a Viewer type that other data sources can choose to extend. My base Viewer type is simply as follows:
In a different data source, I would like to be able to extend this type using the following syntax:
This does not work, however, because each data source is being converted into a schema and then the schemas are being merged. If I just add my additional fields without the extend syntax, the first encountered instance of a type with a given name is used.
mergeSchemas
accepts an argonTypeConflict
for resolving issues like this, but as far as I can tell, there is no way to pass this in via gramps config. Perhaps this can be added to the config somewhere?