Issue on 'Variable "$agent_id" of required type "String!" was not provided.'. ask for help. thanks. #1025
Replies: 6 comments 4 replies
-
This means you expect a non-null string on the "GraphQL type system level, i.e. instead of I see that you added the In other words: likely a |
Beta Was this translation helpful? Give feedback.
-
the error message from laravel.log
|
Beta Was this translation helpful? Give feedback.
-
Can you please edit all your messages and add proper codeblock formatting first? I hope you can see they're barely readable currently 😅 I did it for the first one, but don't want to do it for all of them, thanks. |
Beta Was this translation helpful? Give feedback.
-
The backend AgentQuery,php
|
Beta Was this translation helpful? Give feedback.
-
For the agent_id's type definition in Frondend. in the beginning, I tried it with the ID!. then in the backend AgentQuery, the accordingly args type was Type::int(). it also had the similar error when frontend was executed: Variable "$agent_id" of required type "Int" was not provided. Greatly appreciate any helps! |
Beta Was this translation helpful? Give feedback.
-
When I check your other comment #1025 (reply in thread) it says
That's an uppercase A couple of more advises (and I guess the README should be cleaned up, too):
HTH! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
my frontend use vue 3 + "@apollo/client": "^3.7.11", "@vue/apollo-composable": "^4.0.0-beta.4",
the query code is:
and backend: rebing/graphql-laravel
the AgentQuery code:
the query can be executed in Graphiql, but when being exceuted in frontend, I got the error.
Does any one can help? Thank a lot!
Beta Was this translation helpful? Give feedback.
All reactions