Skip to content

Support for leading vertical bar in union types #465

@nullworkbench

Description

@nullworkbench

First of all, I want to express my sincere gratitude to the developers of Lacinia for their hard work to maintaining this project.

Currently, the following notation is supported,

union SomeUnionType =
    TypeA
  | TypeB
  | TypeC

But, writing like below will throw Failed to parse GraphQL schema. exception.

union SomeUnionType =
  | TypeA
  | TypeB
  | TypeC

I would like to request support for leading vertical bar in union types.

This is already supported in the graphql-spec.

Union members may be defined with an optional leading | character to aid formatting when representing a longer list of possible
https://github.com/graphql/graphql-spec/blob/main/spec/Section%203%20--%20Type%20System.md#unions

Thank you for your consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions