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
Is your feature request related to a problem? Please describe.
While working with an implementation that uses a MockStore, I have come across cases where inputs for mutations need to be stored to be used in subsequent calls. A base use case would be the CRUD operations done on a resource where the update requires the object to exist beforehand. For now, it appears that the resolver responses are automatically stored (which is great), but a user cannot manually store or retrieve an input type in the MockStore.
Describe the solution you'd like
The get and set methods within the MockStore successfully store and retrieve an input type if it is defined within the schema.
Describe alternatives you've considered
I'm able to achieve this functionality by creating an extended class from MockStore and "overwriting" the private getType function. It seems to work fine, but I'm sure there are edge-cases and scenarios I'm not aware of. It also doesn't feel great hacking a way to change a private method.
Another alternative is to not use the MockStore for this functionality at all. There are definitely use cases where that makes sense, but the generally functionality still seems like a general use case.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
While working with an implementation that uses a
MockStore
, I have come across cases where inputs for mutations need to be stored to be used in subsequent calls. A base use case would be the CRUD operations done on a resource where the update requires the object to exist beforehand. For now, it appears that the resolver responses are automatically stored (which is great), but a user cannot manually store or retrieve an input type in theMockStore
.Describe the solution you'd like
The
get
andset
methods within theMockStore
successfully store and retrieve an input type if it is defined within the schema.Describe alternatives you've considered
I'm able to achieve this functionality by creating an extended class from
MockStore
and "overwriting" the private getType function. It seems to work fine, but I'm sure there are edge-cases and scenarios I'm not aware of. It also doesn't feel great hacking a way to change a private method.Another alternative is to not use the
MockStore
for this functionality at all. There are definitely use cases where that makes sense, but the generally functionality still seems like a general use case.The text was updated successfully, but these errors were encountered: