E528 Users can define the configuration/scope the graphql-dgs-codegen-client-core will have. by berngp · Pull Request #198 · Netflix/dgs-codegen · GitHub
[go: up one dir, main page]

Skip to content

Users can define the configuration/scope the graphql-dgs-codegen-client-core will have.#198

Merged
berngp merged 1 commit intomasterfrom
feature/graphql-dgs-codegen-client-core-scope
Jul 27, 2021
Merged

Users can define the configuration/scope the graphql-dgs-codegen-client-core will have.#198
berngp merged 1 commit intomasterfrom
feature/graphql-dgs-codegen-client-core-scope

Conversation

@berngp
Copy link
Contributor
@berngp berngp commented Jul 27, 2021

Rationale

Users might require the artifacts contained in the graphql-dgs-codegen-client-core module to be exposed as part of the
API of the module that contains the code generated by this plugin. An example of this will be a GraphQL JAR client
module with the generated codegen code. In such a module the developer will require the artifacts included in the graphql-dgs-codegen-client-core as well.

A developer can manually add the dependency to the graphql-dgs-codegen-client-core, see example below, but
this will require a prior knowledge on the specific version of the plugin. This version might be obscured if the developer is defining such a version using either latest.release or latest.candidate as version.

Example of how the dependency can be defined explicitly.

dependencies {
    api 'com.netflix.graphql.dgs.codegen:graphql-dgs-codegen-client-core:123'
}

Feature Description

With this change a developer can define the configuration/scope the dependency will be added to. Let's say, a developer want to add the graphql-dgs-codegen-client-core to the api configuration/scope. To do so they will define the following
configuration:

codegen {
    clientCoreScope = "api"
}

…n-client-core will have.

Rationale
=========

Users might require the artifacts contained in the `graphql-dgs-codegen-client-core` module to be exposed as part of the
API of the module that contains the code generated by this plugin. An example of this will be a GraphQL JAR client
module with the generated codegen code. In such a module the developer will require the
artifacts included in the `graphql-dgs-codegen-client-core` as well to use it.

A developer can manually add the dependency to the `graphql-dgs-codegen-client-core` manually, see example below, but
this will require the prior knowledge the specific version of the plugin. This version might be obscured if the
developer is defining such a version using `latest.release` or `latest.candidate`.

Example of how the dependency can be defined explicitly.

```
dependencies {
    api 'com.netflix.graphql.dgs.codegen:graphql-dgs-codegen-client-core:123'
}
```

Feature Description
===================

With this change a developer can define the configuration/scope the
dependency will be added to. Let's say a developer want to add the `graphql-dgs-codegen-client-core` to the `api`
configuration/scope. To do so they will define the following
configuration...

```
codegen {
    clientCoreScope = "api"
}
```
@berngp berngp merged commit cc7ac6f into master Jul 27, 2021
@berngp berngp deleted the feature/graphql-dgs-codegen-client-core-scope branch July 27, 2021 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0