You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue while attempting to download a schema from my GraphQL endpoint using Apollo. I am working on integrating Apollo GraphQL with a Supabase project. Here's the configuration I'm using in my build.gradle.kts file:
apollo {
service("service") {
packageName.set("com.ngumi.app")
srcDir("src/main/graphql")
introspection {
endpointUrl.set("https://peclvhlyxzwmegdkhtvj.supabase.co/graphql/v1")
headers.put("apikey", "<my-api-key>")
}
codegenModels.set("operationBased")
}
}
WhenI run the following Gradle task:
./gradlew downloadApolloSchema
BashIt fails with the following error:Execution failed for task ':app:downloadApolloSchema'.
> java.lang.Exception:Introspection response from [https://<your-supabase-endpoint>](https://peclvhlyxzwmegdkhtvj.supabase.co/graphql/v1).supabase.co/graphql/v1 can not be parsedUse code [with caution](https://support.google.com/legal/answer/13505487).DebuggingStepsTakenTo investigate further, I directly fetched the introspection query response from the server using Invoke-WebRequestinPowerShell. Here's the response I received:{ "errors": [ { "message": "query parse error: Parse error at 1:787\nUnexpected `}[Punctuator]`\nExpected `end of input`\n" } ]}I also used the Apollo sandbox to run the introspection query, and it was successful and returned a full schema.Additional ContextThe GraphQL endpoint is functional, as I've successfully executed other queries through Postmanand the Apollo sandbox.
The parse error suggests that there is an unexpected } character at the end of the introspection query being sent (Based on the error provided by my supabse endpoint).
Running the Gradle task with --info and--debug did not provide additional clarity beyond pointing to the parse error.
QuestionsIs it possible that the introspection query generated by Apollois malformed, or it isnot compatible with the version of the GraphQL server that my Supabase endpoint is using?If so, where can I adjust it?Are there any known issues with Apollo's handling of introspection queries on Supabase-hosted GraphQL endpoints?Is there a way to customize or manually supply the introspection query used by Apollo? Or an alternative approach to downloading a schema when introspection is not possible?I appreciate any help or guidance the team can provide! Please let me know if additional information is needed.Thank you in advance for your support!
The text was updated successfully, but these errors were encountered:
paste it in your project in src/main/graphql/schema.json
convert it to SDL with ./gradlew convertApolloSchema --from src/main/graphql/schema.json --to src/main/graphql/schema.graphqls
delete schema.json
Thank you for your response.
The suggested workaround is effective and allows me to proceed with the project while awaiting an official fix. I appreciate the clarification that this is a Supabase-related issue. Your assistance has been very helpful.
Question
Hello There,
I'm encountering an issue while attempting to download a schema from my GraphQL endpoint using Apollo. I am working on integrating Apollo GraphQL with a Supabase project. Here's the configuration I'm using in my
build.gradle.kts
file:The text was updated successfully, but these errors were encountered: