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
When mutation request is invalid, the plan is cached and reused for valid mutation plans.
Steps to reproduce
Here is an reproducible benjie/ouch-my-finger#19. First I failed to reproduce because, in graphiql, I was passing patch in the query instead of passing as variables. There is a query.graphql file with the query which can be used in graphiql. After server starts, first you need to run the mutation with invalid variables,
empty patch object, you will get error "no values were provided". After you update the patch and add some values there, you will still get the error.
Expected results
It should run successfully second time.
Actual results
It throws error like I didn't provide any values in the patch.
Additional context
Initially I tried to export the schema js, to see what is wrong in the plans. But I had a lot of custom plugins without EXPORTABLE, so I gave up. So for me it was a bit hard to debug this case to find what I'm doing wrong that I can't reproduce (I guess, it's a me issue), I'm curious if you have any advice for me to do smarter debugging of plans?
Possible Solution
The step for fieldArgs should be re-executed, I'm not sure why it's reusing the plan (do args have plan / plan cache?). I think this one is strangest thing happening here.
Does it makes sense to only cache the plans if they succeed?
The text was updated successfully, but these errors were encountered:
Summary
When mutation request is invalid, the plan is cached and reused for valid mutation plans.
Steps to reproduce
Here is an reproducible benjie/ouch-my-finger#19. First I failed to reproduce because, in graphiql, I was passing patch in the query instead of passing as variables. There is a
query.graphql
file with the query which can be used in graphiql. After server starts, first you need to run the mutation with invalid variables,empty patch object, you will get error "no values were provided". After you update the patch and add some values there, you will still get the error.
Expected results
It should run successfully second time.
Actual results
It throws error like I didn't provide any values in the patch.
Additional context
Initially I tried to export the schema js, to see what is wrong in the plans. But I had a lot of custom plugins without
EXPORTABLE
, so I gave up. So for me it was a bit hard to debug this case to find what I'm doing wrong that I can't reproduce (I guess, it's a me issue), I'm curious if you have any advice for me to do smarter debugging of plans?Possible Solution
The step for fieldArgs should be re-executed, I'm not sure why it's reusing the plan (do args have plan / plan cache?). I think this one is strangest thing happening here.
Does it makes sense to only cache the plans if they succeed?
The text was updated successfully, but these errors were encountered: