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

Generated code formatting #74

Closed
sporto opened this issue Oct 14, 2018 · 1 comment
Closed

Generated code formatting #74

sporto opened this issue Oct 14, 2018 · 1 comment

Comments

@sporto
Copy link
Collaborator

sporto commented Oct 14, 2018

I often find myself opening the generated files for reference when building GraphQl queries.

At the moment the generator will create files where records are all in one line. e.g.

type alias Something =
    { clientMutationId : OptionalArgument String, ruleKind : Api.Enum.Rule_Kind.Rule_Kind, segmentIDs : OptionalArgument (List Api.Scalar.Id) }

I find that this makes using these files for reference harder as I need to scroll a lot horizontally to see the attributes I need.

It would be great if the generator could add some line breaks so Elm format will format like:

type alias Rules_RequestRuleKindSummaryReportInput =
    { clientMutationId : OptionalArgument String
    , ruleKind : Api.Enum.Rule_Kind.Rule_Kind
    , segmentIDs : OptionalArgument (List Api.Scalar.Id) 
    }

Thanks

@dillonkearns
Copy link
Owner

This is fixed with NPM version 2.0.1 👍

Thanks for filing the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants