zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

source.ex (661B)


      1 defmodule Absinthe.Language.Source do
      2   @moduledoc false
      3 
      4   # A representation of source input to GraphQL, mostly useful for clients
      5   # who store GraphQL documents in source files; for example, if the GraphQL
      6   # input is in a file `Foo.graphql`, it might be useful for name to be
      7   # `"Foo.graphql"`.
      8   #
      9   # ## Examples
     10   #
     11   #     @filename "Foo.graphql"
     12   #     # ...
     13   #     {:ok, data} = File.read(@filename)
     14   #     %Absinthe.Language.Source{body: body, name: @filename}
     15   #     |> Absinthe.run(App.Schema)
     16   defstruct body: "",
     17             name: "GraphQL"
     18 
     19   @type t :: %__MODULE__{
     20           body: String.t(),
     21           name: String.t()
     22         }
     23 end