Enum Types

This reference doc is generated based on thisexample schema.

Enum types define a set of allowed values for a field in a GraphQL schema.

Data Connect defines a few Built in enum types, but doesn't support developer defined enum types yet.

Data Connect Defined

enum AccessLevel

AccessLevel specifies coarse access policies for common situations.

Possible Values:

ValueDescription
PUBLICThis operation is accessible to anyone, with or without authentication. Equivalent to:@auth(expr: "true")
USER_ANONThis operation can be executed only with a valid Firebase Auth ID token.Note: This access level allows anonymous and unverified accounts, which may present security and abuse risks. Equivalent to:@auth(expr: "auth.uid != nil")
USERThis operation is restricted to non-anonymous Firebase Auth accounts. Equivalent to:@auth(expr: "auth.uid != nil && auth.token.firebase.sign_in_provider != 'anonymous'")
USER_EMAIL_VERIFIEDThis operation is restricted to Firebase Auth accounts with verified email addresses. Equivalent to:@auth(expr: "auth.uid != nil && auth.token.email_verified")
NO_ACCESSThis operation cannot be executed by anyone. The operation can only be performed by using the Admin SDK from a privileged environment. Equivalent to:@auth(expr: "false")

enum Date_Interval

Possible Values:

ValueDescription
WEEKRepresents a time interval of one week.
MONTHRepresents a time interval of one month.
YEARRepresents a time interval of one year.

enum IndexFieldOrder

Specifies the sorting order for database indexes.

Possible Values:

ValueDescription
ASCSorts the field in ascending order (from lowest to highest).
DESCSorts the field in descending order (from highest to lowest).

enum IndexType

Defines the type of index to be used in the database.

Possible Values:

ValueDescription
BTREEA general-purpose index type commonly used for sorting and searching.
GINGeneralized Inverted Index, optimized for indexing composite values such as arrays.
HNSWHierarchical Navigable Small World graph, used for nearest-neighbor searches on vector fields.
IVFFLATInverted File Index, optimized for approximate nearest-neighbor searches in vector databases.

enum OrderDirection

Defines the orderBy direction in a query.

Possible Values:

ValueDescription
ASCResults are ordered in ascending order.
DESCResults are ordered in descending order.

enum Search_QueryFormat

Possible Values:

ValueDescription
QUERYAllows search engine style semantics (e.g. quoted strings, AND and OR).
PLAINSplits the query into words and does ANDs between them.
PHRASEMatches an exact phrase. Requires the words to be in the same order (i.e. "brown dog" will not match "brown and red dog").
ADVANCEDCreate complex queries using the full set of tsquery operators.

enum Timestamp_Interval

Possible Values:

ValueDescription
SECONDRepresents a time interval of one second.
MINUTERepresents a time interval of one minute.
HOURRepresents a time interval of one hour.
DAYRepresents a time interval of one day.
WEEKRepresents a time interval of one week.
MONTHRepresents a time interval of one month.
YEARRepresents a time interval of one year.

enum VectorSimilarityMethod

Defines the similarity function to use when comparing vectors in queries.

Defaults toINNER_PRODUCT.

Viewall vector functions.

Possible Values:

ValueDescription
L2Measures the Euclidean (L2) distance between two vectors.
COSINEMeasures the cosine similarity between two vectors.
INNER_PRODUCTMeasures the inner product(dot product) between two vectors.

Built In

enum __DirectiveLocation

A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.

Possible Values:

ValueDescription
QUERYLocation adjacent to a query operation.
MUTATIONLocation adjacent to a mutation operation.
SUBSCRIPTIONLocation adjacent to a subscription operation.
FIELDLocation adjacent to a field.
FRAGMENT_DEFINITIONLocation adjacent to a fragment definition.
FRAGMENT_SPREADLocation adjacent to a fragment spread.
INLINE_FRAGMENTLocation adjacent to an inline fragment.
VARIABLE_DEFINITIONLocation adjacent to a variable definition.
SCHEMALocation adjacent to a schema definition.
SCALARLocation adjacent to a scalar definition.
OBJECTLocation adjacent to an object type definition.
FIELD_DEFINITIONLocation adjacent to a field definition.
ARGUMENT_DEFINITIONLocation adjacent to an argument definition.
INTERFACELocation adjacent to an interface definition.
UNIONLocation adjacent to a union definition.
ENUMLocation adjacent to an enum definition.
ENUM_VALUELocation adjacent to an enum value definition.
INPUT_OBJECTLocation adjacent to an input object type definition.
INPUT_FIELD_DEFINITIONLocation adjacent to an input object field definition.

enum __TypeKind

An enum describing what kind of type a given__Type is.

Possible Values:

ValueDescription
SCALARIndicates this type is a scalar.
OBJECTIndicates this type is an object.fields andinterfaces are valid fields.
INTERFACEIndicates this type is an interface.fields,interfaces, andpossibleTypes are valid fields.
UNIONIndicates this type is a union.possibleTypes is a valid field.
ENUMIndicates this type is an enum.enumValues is a valid field.
INPUT_OBJECTIndicates this type is an input object.inputFields is a valid field.
LISTIndicates this type is a list.ofType is a valid field.
NON_NULLIndicates this type is a non-null.ofType is a valid field.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-21 UTC.