Skip to content

Configs in "graphqlSchemas" should be optional #51

@kobylynskyi

Description

@kobylynskyi

If only graphqlSchemaPaths is specified then the build gradle task fails.

Gradle config:

graphqlCodegen {
    graphqlSchemaPaths = ["$projectDir/src/main/resources/schema.graphqls".toString()]
    outputDir = new File("$buildDir/generated")
}

Output:

Bogdans-MacBook-Pro:gradle bogdankobylynskyi$ ./gradlew clean build publishToMavenLocal
> Task :example:graphqlCodegen FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':example:graphqlCodegen'.
> No value has been specified for property 'graphqlSchemas.rootDir'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
3 actionable tasks: 3 executed

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions