Replies: 1 comment 2 replies
-
Hey @mashwishi Thanks for asking. Context about the errorThis is error you are receiving is based on this graphql spec - https://spec.graphql.org/June2018/#sec-Input-Objects . More over there is also a different spec for validation against variables here - https://spec.graphql.org/June2018/#sec-All-Variables-Used TLDR; Using variable which isn’t defined in operation, will result into “unexpected variableValues” error. In your case apart from WorkaroundCleanest way to do this is to sanitize your object (which you will pass in query variables) by either creating a new object from it and passing data to it or either you remove the unnecessary fields from it which are not defined in operation as variables. You could just delete the properties of that object. Consider This workaround is intended for client side code. But there's no exception for graphiQL explorer as that error would be thrown upon undefined variables in operation. If trying via graphiQL explorer, you would manually need to not pass those variables in query variables scope. ConclusionThis behavior is in compliant with this graphql spec and not with Hasura directly, so we would suggest you to go through those graphql spec links and understand the aspect of it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently having hard time setting up my end points clerk to hasura.
I am absolute new to this platform specially at GraphiQL and just following documentations and youtube video
What I am trying to do is import/insert specific data i neeed only from clerk. Here's the sample query variables:
What I only need to this object is content inside of the "data" is:
created_at, first_name, user_id, updated_at, profile_image_url
The GraphiQL Query I did is:
Which throwing error of:
I tried using other method like this:
But it is still having error because of object and type fields
Beta Was this translation helpful? Give feedback.
All reactions