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
I have the idea to separate this addon into multiple libraries by its logical parts. Those being:
The ability to automatically resolve types from a given schema.
Knowing how to fetch data from Mirage based on fields from a query.
My tentative plan is to create a GraphQL auto-resolver library that expects a resolution strategy to be supplied to it and separately a Mirage auto-resolution strategy. The Ember addon would then become a thin wrapper around these two libraries or it would be deprecated.
I see several advantages here:
A standalone GraphQL auto-resolution library might be useful in another context.
Separating the logical pieces could mean easier, more focused development of each part.
Detaching these capabilities from Ember would ensure compatibility with Mirage itself if it were also detached from Ember.
I've already started experimenting with these ideas. As I spend more time working on the separate libraries the implementation details will become more clear. So far, these are my thoughts:
The auto-resolver should expect the strategy to have callbacks for resolving GraphQL's built-in types, e.g., GraphQLObjectType, GraphQLInterfaceType, GraphQLList, etc.
I have the idea to separate this addon into multiple libraries by its logical parts. Those being:
My tentative plan is to create a GraphQL auto-resolver library that expects a resolution strategy to be supplied to it and separately a Mirage auto-resolution strategy. The Ember addon would then become a thin wrapper around these two libraries or it would be deprecated.
I see several advantages here:
I've already started experimenting with these ideas. As I spend more time working on the separate libraries the implementation details will become more clear. So far, these are my thoughts:
GraphQLObjectType,GraphQLInterfaceType,GraphQLList, etc.