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
Hi @jneurock, I'm getting this error while trying to execute a query that does not include any "type" property. When I inspect the ApolloError object does not give any valuable information about the error location. I've got no errors while trying to seed this "Contacts" Entity, however, the MirageJS query does not work properly. Could it be some conflict of dependencies? I'm using:
Server.ts queries - I'm not using automatic query handling, because of intermediary pagination types involved (edges and pageInfo). The console.log call inside the contacts query does not get triggered, I've only gotten the error. I'm assuming that this custom resolver is not working, however, the listings query works fine
There may be several issues. It’s a little hard to tell.
I suspect the problem with the 'type' of undefined issue has to do with missing type info in the data returned. Mirage GraphQL will take Mirage records returned from resolvers and decorate them with the necessary type info for GraphQL. If you implement a custom resolver, you either need to exclusively return Mirage records or decorate the data with the type info as needed, e.g., a __typename field. Note: I could be totally wrong here and not fully remembering how this works.
I suspect the reason the contacts resolver isn’t working is that it’s nested under listings meaning it will only be called when resolving contacts as a field of listings.
Btw, Mirage GraphQL handles Relay Pagination out-of-the-box; however, it won’t include the extra pageInfo fields like you have.
Hi @jneurock, I'm getting this error while trying to execute a query that does not include any "type" property. When I inspect the ApolloError object does not give any valuable information about the error location. I've got no errors while trying to seed this "Contacts" Entity, however, the MirageJS query does not work properly. Could it be some conflict of dependencies? I'm using:
Apollo Client Error object
Query that throws this error
Server.ts queries - I'm not using automatic query handling, because of intermediary pagination types involved (edges and pageInfo). The console.log call inside the contacts query does not get triggered, I've only gotten the error. I'm assuming that this custom resolver is not working, however, the listings query works fine
The text was updated successfully, but these errors were encountered: