GraphqlMarkdown.OperationDetailsHelpers (Graphql Markdown v0.5.1)

View Source

A set of helpers to generate query and mutation details.

Summary

Functions

Creates a map with the details of a query or mutation. The details created include the operation type, operation name, arguments, and return type.

Types

argument()

@type argument() :: %{name: String.t(), type: String.t(), required: boolean()}

field()

@type field() :: %{name: String.t(), type: String.t()}

graphql_operation_details()

@type graphql_operation_details() :: %{
  operation_type: String.t(),
  operation_name: String.t(),
  arguments: [argument()],
  return_type: return_type()
}

return_type()

@type return_type() :: %{
  name: String.t(),
  kind: String.t(),
  fields: [field()],
  possible_types: [field()]
}

Functions

generate_operation_details(type, field, schema_details)

@spec generate_operation_details(String.t(), map(), GraphqlMarkdown.Schema.t()) ::
  graphql_operation_details()

Creates a map with the details of a query or mutation. The details created include the operation type, operation name, arguments, and return type.