GraphqlQuery.Fragment (graphql_query v0.3.7)
View SourceStruct representation of a GraphQL fragment.
Summary
Functions
Converts a GraphQL Document struct into a Fragment struct.
Types
Functions
Converts a GraphQL Document struct into a Fragment struct.
Takes a Document that was created with type: :fragment
and converts it
to the appropriate Fragment representation.
Examples
iex> document = GraphqlQuery.Document.new("fragment UserData on User { id name }", name: "UserData", type: :query)
iex> fragment = GraphqlQuery.Fragment.from_query(document)
iex> fragment.name
"UserData"
iex> fragment.fragment
"fragment UserData on User { id name }"
@spec set_document_info(t(), GraphqlQuery.DocumentInfo.t() | nil) :: t()