Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable declaratino missing wenn miltiple operations are used #669

Open
rogereitner opened this issue Mar 28, 2024 · 0 comments
Open

Variable declaratino missing wenn miltiple operations are used #669

rogereitner opened this issue Mar 28, 2024 · 0 comments

Comments

@rogereitner
Copy link

Hi,
ich tried to create a query based on GraphQLMultiQueryRequest using variable references:

quey ($request1: Type1m $request2: Type2){
op1(request: $request1){
...
}
op2 (request: $request2){
...
}
}

by setting up variable references in the first request I am using in the GraphQLMultiQueryRequest for serializtion.
The query, that I get from call of the method serialize ist
quey{
op1(request: $request1){
...
}
op2 (request: $request2){
...
}
}
which cannot be performed, as the engine cannot have an idea of the type of operations the arguments.
I figured, that it might be, that just

operationDef.variableDefinitions(variableDefinitions)...
is missing in the implementation of GraphQLMultiQueryRequest. However, as I can see, that variableDefinitions are collected earlier in the code, there might be a reason I'm unaware off, that is prohibiting to do so.
Please let me know, whether or not the code change I'm suggesting will work and if not, what would be the right way to deal with such a situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant