Unable to use interpolated strings for endpoints with GraphQL source #991
Closed
tmc-yuval-naveh
started this conversation in
General
Replies: 1 comment 2 replies
-
It's not the same, but similar: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have 3 downstream services - one JSON schema (using loadJSONSchemaSubgraph) and the others are GraphQL (using loadGraphQLHTTPSubgraph).
All endpoints use interpolated strings.
The JSON schema source works fine. The endpoint string reads from env and query comes back as expected.
The GraphQL sources do not work - queries fail with an error
When I use the literal value (not interpolated string) then the query works fine.
The url above shows the the problem:
%7Benv.XX_EVENTS_ENDPOINT%7D
Any ideas? workarounds? Is this a bug?
I looked at the implementation of loadGraphQLHTTPSubgraph and couldn't spot an issue/
UPDATE: logged the graphql source handler and can see that the endpoint value was replaced with the env var value.
The supergraph.graphql file has the uninterpolated string (i.e. template) as expected. I guess the loading of the schema has to work or the build phase would have failed. So this seems to be a runtime issue, with hive gateway not interpolating the endpoint.
Beta Was this translation helpful? Give feedback.
All reactions