Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DGS plugin gives a warning saying collectionType value set as input does not match the schema #29

Closed
vasquez-csdisco opened this issue Mar 17, 2022 · 4 comments

Comments

@vasquez-csdisco
Copy link

Hi,

I am getting a warning message when implementing a @DgsData function that contains a method inside.

Script example:

type Data @key(fields: "id") @extends{
  id: ID! @external
  configurations(settings: [ConfigInput!]!): [ConfigOutput!]!
}

input ConfigInput {
  name: String!
}

type ConfigOutput {
  value: String!
}

And implementing this method

 @DgsData(parentType = "Data", field = "configurations")
  fun type1Configurations(@InputArgument(collectionType = ConfigInput::class) settings: List<ConfigInput>): List<ConfigurationToggle> {

    // Work here
  }

I keep getting a warning saying that @InputArgument type does not match the schema, expected @InputArgument (collectionType=ConfigInput) settings: List<ConfigInput>

If I apply the fix hit the plugin gives it actually cause an error since it is not providing an extension for the collectionType ConfigInput

image

The same situation happens when using it on a typical query with no graphql federation.

Can you please help, thanks!

@vasquez-csdisco vasquez-csdisco changed the title DGS plugin gives a warning saying that collectionType is not compatible in kotlin DGS plugin gives a warning saying collectionType value set as input does not match the schema Mar 17, 2022
@srinivasankavitha
Copy link
Contributor

Thanks for reporting this, will look into a fix. In the meantime, you could try suppressing the hint in IntelliJ.

@vasquez-csdisco
Copy link
Author

Much appreciated! 🙌🏼

@srinivasankavitha
Copy link
Contributor

Fix in the latest release which will be available in the next week or so.

@vasquez-csdisco
Copy link
Author

Fix in the latest release which will be available in the next week or so.

that is awesome! thank you!

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

No branches or pull requests

2 participants