When I'm building the project I'm getting this error:
com.apollographql.apollo.compiler.parser.GraphQLDocumentParseException:
Failed to parse GraphQL file .../schema.json.graphql (3:7)
Unsupported token `{`
and this is the schema.json file
query {
getUsers {
id
name
lastName
}
}
Yeah probably the message should be more descriptive, but you must provide query name.
I'm still getting the error:
query getUsers {
getUsers {
id
name
lastName
}
}
Are you getting the same error?
And I guess you are missing smth:
query.graphqlschema.json file that GraphQL introspection query gives to you (or backend dev handed it over to you).src/*/graphql/com/sample/... folder in your project.Schema is used to correctly parse your GraphQL queries.
I solved it! I had a file called schema.graphql that was causing the problems, I removed it and it works. Thanks for the help @sav007
I'm getting the error while building too. Here is the error
com.apollographql.apollo.compiler.parser.GraphQLDocumentParseException:
Failed to parse GraphQL file C:\Users\Narayanan KA\Downloads\Android projects\Kickstarter\app\src\main\graphql\activity.graphql (2:35)
Unsupported token }
Most helpful comment
I solved it! I had a file called schema.graphql that was causing the problems, I removed it and it works. Thanks for the help @sav007