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

feat: ability to specify @GraphQLName on input types w/o suffix #1960

Merged
merged 3 commits into from
Apr 17, 2024

Commits on Apr 17, 2024

  1. fix: ability to specify @GraphQLName on input types without suffix

    Currently input types are always suffixed with `Input` which is problematic as there are use cases where users might want to provide different custom name. This change adds check whether specified type is input only and if thats the case it does not attempt to add `Input` suffix.
    
    ```kotlin
    // old: MyClassInput
    // new: MyClass
    @GraphQLValidObjectLocations([GraphQLValidObjectLocations.Locations.INPUT_OBJECT])
    class MyClass
    
    // can also be combined with renaming
    // old: MyRenamedClassInput
    // new: MyRenamedClass
    @GraphQLValidObjectLocations([GraphQLValidObjectLocations.Locations.INPUT_OBJECT])
    @GraphQLName("MyRenamedClass")
    class MyClass
    ```
    dariuszkuc committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    ec11992 View commit details
    Browse the repository at this point in the history
  2. update docs

    dariuszkuc committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    95a6a92 View commit details
    Browse the repository at this point in the history
  3. Update renaming-fields.md

    clarify that `Input` suffix is only appended IF it already doesn't end with that suffix
    dariuszkuc authored Apr 17, 2024
    Configuration menu
    Copy the full SHA
    dfbbf32 View commit details
    Browse the repository at this point in the history