Let’s say I have a Parse class called “Media”. The find query for this class will not be added to the auto-generated GraphQL schema, because it collides with the get query:
warn: Query media could not be added to the auto schema because it collided with an existing field.
The reason is that the auto-generation uses pluralization for the find query, but the plural of “Media” is “Media”. This whole thing could be fixed (#6218) but I didn’t succeed in doing that yet. Now I’m looking for a workaround.
In the GraphQL guide under Adding Custom Schema there is some documentation, which isn’t very helpful if you’re also still learning how GraphQL works. My goal is clear: I want to add custom schema so that when I write “mediaObjects” in my GraphQL query, a find query on the “Media” class is executed.
I am able to add custom schema, but I don’t know what it should be…
# schema.graphql
extend type Query {
mediaObjects: [Media]! @resolve(to: "Media")
}
How should the query be extended for that purpose?
Should we add this troubleshoot to the documentation?