Search code examples
apollo-clientapollo-kotlin

Is it possible to change the default schema directory in Apollo Kotlin?


I am trying to use Apollo Kotlin as GraphQL client for GraphQL queries. Apollo Kotlin requires a schema in your module’s src/main/graphql directory. All our Schemas are present in a separate git repo (say MyGraphQLSchema). To avoid duplication, can apollo-kotlin read schemas from a different location or package ?


Solution

  • The schemaFile option can be used for this.