apollographql / apollographql/apollo-tooling
Ability to generate json schema from a local file via the downloadApolloSchema gradle task.
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
Our Android apollo setup right now downloads a GraphQL SDL file manually (It's a custom POST endpoint).
We manually invoke apollo CLI's client:downloadSchema with a relatively basic service config
`module.exports = {
client: {
service: {
name: 'myservice',
localSchemaFile: '../../schema.graphql'
},
includes: ['**/*.graphql']
}
}`
This is great, and allows us to generate the JSON schema off of a local GraphQL SDL file rather than hitting an endpoint.
I do not seem to be able to replicate this functionality through the downloadApolloSchema gradle task. While this task seems to just wrap client:downloadSchema, it appears to have the additional requirement of endpoint being set.
My feature request is to have the ability to generate the GraphQL schema JSON off of a local SDL file via the gradle plugin, mirroring the functionality of the raw CLI interface.
I would be willing to work on an implementation of this if someone could point me in the direction of where the gradle task is created/exposed.
Contributor guide
Research direction
Start by locating the downloadApolloSchema Gradle task and its wrapper around client:downloadSchema; compare its endpoint requirement with the CLI's localSchemaFile configuration. Done means the Gradle task can generate a JSON schema from a local GraphQL SDL file without requiring an endpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, graphql
- Domain
- build-system, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100