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
✨ functions: support enum argument types #6780
Labels
Comments
helderco
changed the title
✨ functions: argument values
✨ functions: support enum argument types
Feb 29, 2024
This comment was marked as resolved.
This comment was marked as resolved.
High level design for the schema required for this: To support defining new enums via the API it’s similar to type EnumTypeDef {
name: String!
description: String!
values: [EnumValueTypeDef!]!
}
type EnumValueTypeDef {
name: String!
description: String!
}
type TypeDef {
"""
If kind is ENUM_KIND, the enum-specific type definition.
If kind is not ENUM_KIND, this will be null.
"""
asEnum: EnumTypeDef
"""
Returns a TypeDef of kind Enum with the provided name.
Note that an enum's values may be omitted if the intent is only to refer to an enum.
This is how functions are able to return their own, or any other circular reference.
"""
withEnum(name: String!, description: String = ""): TypeDef!
"""
Adds a static value for an Enum TypeDef, failing if the type is not an enum.
"""
withValue(name: String!, description: String = ""): TypeDef!
}
enum TypeDefKind {
"""
A GraphQL enum type and its values.
Always paired with an EnumTypeDef.
"""
ENUM_KIND
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What are you trying to do?
[male, female]
forgender
).Why is this important to you?
shell completion
How are you currently working around this?
No response
The text was updated successfully, but these errors were encountered: