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

Adds support for flags enum #5186

Merged
merged 1 commit into from
Jun 27, 2022
Merged

Conversation

PascalSenn
Copy link
Member

@PascalSenn PascalSenn commented Jun 27, 2022

Adds support for flag enums

Given the following enum

[Flags]
public enum Example { First, Second, Third }

public class Query { public Example Loopback(Example input) => input;

The following schema is produced

type Query {
    loopback(input: ExampleFlagsInput!): ExampleFlags
}

type ExampleFlags {
    isFirst: Boolean!
    isSecond: Boolean!
    isThird: Boolean!
}

input ExampleFlagsInput {
    isFirst: Boolean
    isSecond: Boolean
    isThird: Boolean
}

closes #1020

@michaelstaib michaelstaib merged commit 66b9dce into main-version-12 Jun 27, 2022
@michaelstaib michaelstaib deleted the pse/flags-enum-v12 branch June 27, 2022 15:30
@spqr911
Copy link

spqr911 commented Oct 27, 2022

Adds support for flag enums

Given the following enum

[Flags]
public enum Example { First, Second, Third }

public class Query { public Example Loopback(Example input) => input;

The following schema is produced

type Query {
    loopback(input: ExampleFlagsInput!): ExampleFlags
}

type ExampleFlags {
    isFirst: Boolean!
    isSecond: Boolean!
    isThird: Boolean!
}

input ExampleFlagsInput {
    isFirst: Boolean
    isSecond: Boolean
    isThird: Boolean
}

closes #1020

Flags still doesn'twork please reopen this issue.

image
image

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

Successfully merging this pull request may close these issues.

3 participants