Open slavik-pastushenko opened 10 months ago
@slavik-pastushenko I agree, operationName should definitely be optional. What's weird is I'm not able to reproduce on the latest version :thinking: Do you have additional queries in your request?
I used the gateway example "hello" here with operationName set to null
(not provided) and ""
successfully:
From the code you've linked, I think that should only be hit if you have more than one operation in your query. In other words, gateway only requires the operation name when it's ambiguous which operation it should run.
I know it's been a few months since you opened this, but is this still happening for you? If you have an example with steps to reproduce, I can help dig into this further with you.
Hello! I am trying to migrate to this gateway and realised that I am not able to execute a query without specifying the
operationName
, meaning this query throws an exception:Looks like this is the place where we validate the
operationName
field: https://github.com/nautilus/gateway/blob/master/gateway.go#L69Is it possible to set the fallback value instead of throwing an exception? As an example: solution