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

Imports for field arguments are not added #37

Open
kito99 opened this issue Apr 18, 2019 · 0 comments
Open

Imports for field arguments are not added #37

kito99 opened this issue Apr 18, 2019 · 0 comments

Comments

@kito99
Copy link
Contributor

kito99 commented Apr 18, 2019

Given the following schema:

type Query {
  widgets(
    first: Int
    after: String
    colors: [String]
  ): WidgetResponse
}

The widgets() method is correctly generated, however the import java.util.List is not added to the Query.java file. A work-around for this is to modify the template (graphql-apigen.stg) to always add java.util.List, but, this is hardly ideal :-). I think this could be solved by modifying STModel.getImports() to look at arguments of fields.

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

1 participant