wormwood v0.1.0 Wormwood.GQLLoader

Link to this section Summary

Functions

When provided a path to a GQL document, expands all import statements and attempts to parses it with Absinthe.

When provided the source code of a GQL document, expands all import statements and attempts to parses it with Absinthe.

Link to this section Functions

Link to this function

load_file!(document_path)

load_file!(binary()) :: binary()

When provided a path to a GQL document, expands all import statements and attempts to parses it with Absinthe.

Returns the query string source with imports appended.

For example:

load_file!("assets/js/MyQuery.gql")
Link to this function

load_string!(query_string)

load_string!(binary()) :: binary()

When provided the source code of a GQL document, expands all import statements and attempts to parses it with Absinthe.

Returns the query string source with imports appended.

For example:

load_string!(@my_query_source)