Package-level declarations
Types
A custom issue specific to the Apollo compiler
A fragment has an @include or @skip directive. While this is valid GraphQL, the responseBased codegen does not support that
An exception while converting to/from introspection
A deprecated field/inputField/enumValue/directive is used
Fields have different shapes and cannot be merged
Two type definitions have the same name
A known foreign schema
A GQLNode that has a description
The top level node in a GraphQL document. This can be a schema document or an executable document (or something else if need be)
A variable definition is very similar to an InputValue definition except it doesn't have a description
An issue from the GraphQL spec
A validation issue from the GraphQL spec
The definition is inconsistent with the expected one.
A variable that is inferred from its usages in fragments This is used to create executable fragments
The GraphQL spec allows inline fragments without a type condition, but we currently forbid this because we need the type condition to name the models in operation based codegen.
Another GraphQL validation error as per the spec
A grammar error
Certain enum value names such as type
are reserved for Apollo.
A wrapper around a schema GQLDocument that ensures the GQLDocument is valid and caches some extra information. In particular, Schema:
The schema is invalid
An unknown directive was found.
A variable is unused
When models are nested, upper case fields are not supported as Kotlin doesn't allow a property name with the same name as a nested class. If this happens, the easiest solution is to add an alias with a lower case first letter. If there are a lot of such fields, the Apollo compiler option flattenModels
can also be used to circumvent this error at the price of possible suffixes in model names.
A variable used in a GQLValue
Functions
Definitions from the spec
The foreign schemas supported by Apollo Kotlin. This is exported in case users want to validate documents meant for Apollo Kotlin.
Checks that a list of issue is empty, regardless of the issues. This may throw on Apollo specific issues.
Checks that a list of issues is valid GraphQL per the spec. This ignores any ApolloIssue
For a GQLValue used in input position, validate that it can be coerced to expectedType and coerce it at the same time.
For a GQLValue used in input position, validate that it can be coerced to expectedType and coerce it at the same time.
Escapes a single quoted string. The 2 mandatory characters to be escaped are "
and \
. For better readability, control codes are also escaped. Although /
may be escaped, we leave it as is for better readability.
Extra apollo Kotlin specific definitions from https://specs.apollo.dev/kotlin_labs/<version>
The @link definition for bootstrapping
Extra nullability definitions from https://specs.apollo.dev/nullability/<version>
Parses the source to a GQLDocument, validating the syntax but not the contents of the document.
Parses the source to a List<GQLSelection>, validating the syntax but not the contents of the selections.
Parses the source to a GQLType, validating the syntax but not the contents of the value.
Parses the source to a GQLValue, validating the syntax but not the contents of the value.
Returns the raw type. The raw type is the GQLNamedType without any list/nonnull wrapper types
Parses the source to a List<GQLDefinition>, throwing on parsing or validation errors.
Returns a "full schema" document. Full schema documents are for use by clients and other tools that need to know what features are supported by a given server. They include builtin directives and merge all type extensions
Outputs a schema document to SDL. For executable documents, use toUtf8()
Validates the given document as an executable document.
Validate the given document as a schema:
Add builtin definitions from the latest spec version to the GQLDocument