ExShopifySchema.Generator.Graphql.Introspection.Definition (ExShopifySchema v2025.4.3)
View SourceThis module defines the structure of the GraphQL introspection data.
Build introspection from json data
iex> json = file_path |> File.read!() |> Jason.decode!()
iex> ExShopifySchema.Graphql.Introspection.Definition.build(json)
#=> %ExShopifySchema.Graphql.Introspection.Definition{}
Define a new definition schema
defmodule ExShopifySchema.Generator.Graphql.Introspection.Definition.MyDefinition do
use ExShopifySchema.Generator.Graphql.Introspection.Definition
schema do
field :my_field, String.t()
deprecatable_fields()
end
end
Summary
Functions
Builds a GraphQL introspection definition from the introspection JSON data.
Defines the fields that are common to all GraphQL types that can be deprecated.
Types
@type t() :: %ExShopifySchema.Generator.Graphql.Introspection.Definition{ directives: [ ExShopifySchema.Generator.Graphql.Introspection.Definition.Directive.t() ], schema: ExShopifySchema.Generator.Graphql.Introspection.Definition.Schema.t() | nil, types: [type()] }
@type type() :: ExShopifySchema.Generator.Graphql.Introspection.Definition.ScalarType.t() | ExShopifySchema.Generator.Graphql.Introspection.Definition.ObjectType.t() | ExShopifySchema.Generator.Graphql.Introspection.Definition.InterfaceType.t() | ExShopifySchema.Generator.Graphql.Introspection.Definition.UnionType.t() | ExShopifySchema.Generator.Graphql.Introspection.Definition.EnumType.t() | ExShopifySchema.Generator.Graphql.Introspection.Definition.InputObjectType.t()
The fundamental unit of any GraphQL Schema is the type.
Functions
Builds a GraphQL introspection definition from the introspection JSON data.
Defines the fields that are common to all GraphQL types that can be deprecated.
This macro is used to define the is_deprecated
and deprecation_reason
fields conveniently.