Current section

122 Versions

Jump to

Compare versions

37 files changed
+1825 additions
-307 deletions
  @@ -107,10 +107,7 @@
107 107 <<"lib/absinthe/phase/document/complexity/result.ex">>,
108 108 <<"lib/absinthe/phase/document/current_operation.ex">>,
109 109 <<"lib/absinthe/phase/document/directives.ex">>,
110 - <<"lib/absinthe/phase/document/execution/after_resolution.ex">>,
111 - <<"lib/absinthe/phase/document/execution/before_resolution.ex">>,
112 110 <<"lib/absinthe/phase/document/execution/resolution.ex">>,
113 - <<"lib/absinthe/phase/document/expand_schema_references.ex">>,
114 111 <<"lib/absinthe/phase/document/flatten.ex">>,
115 112 <<"lib/absinthe/phase/document/missing_literals.ex">>,
116 113 <<"lib/absinthe/phase/document/missing_variables.ex">>,
  @@ -181,7 +178,8 @@
181 178 <<"lib/absinthe/utils/suggestion.ex">>,
182 179 <<"lib/mix/tasks/absinthe.schema.json.ex">>,<<"src/absinthe_lexer.erl">>,
183 180 <<"src/absinthe_lexer.xrl">>,<<"src/absinthe_parser.erl">>,
184 - <<"src/absinthe_parser.yrl">>,<<"priv/graphql/introspection.graphql">>,
181 + <<"src/absinthe_parser.yrl">>,<<"src/ex_graphql_lexer.erl">>,
182 + <<"src/ex_graphql_parser.erl">>,<<"priv/graphql/introspection.graphql">>,
185 183 <<"mix.exs">>,<<"README.md">>]}.
186 184 {<<"licenses">>,[<<"BSD">>]}.
187 185 {<<"links">>,
  @@ -189,4 +187,4 @@
189 187 {<<"maintainers">>,[<<"Bruce Williams">>,<<"Ben Wilson">>]}.
190 188 {<<"name">>,<<"absinthe">>}.
191 189 {<<"requirements">>,[]}.
192 - {<<"version">>,<<"1.3.0-beta.2">>}.
190 + {<<"version">>,<<"1.3.0-rc.0">>}.
  @@ -223,7 +223,7 @@ defmodule Absinthe do
223 223 def run(document, schema, options \\ []) do
224 224 pipeline = Absinthe.Pipeline.for_document(schema, options)
225 225 case Absinthe.Pipeline.run(document, pipeline) do
226 - {:ok, result, _phases} ->
226 + {:ok, %{result: result}, _phases} ->
227 227 {:ok, result}
228 228 {:error, msg, _phases} ->
229 229 {:error, msg}
  @@ -20,7 +20,9 @@ defmodule Absinthe.Blueprint do
20 20 # Added by phases
21 21 flags: %{},
22 22 errors: [],
23 - resolution: %Blueprint.Document.Resolution{}
23 + input: nil,
24 + resolution: %Blueprint.Document.Resolution{},
25 + result: %{},
24 26 ]
25 27
26 28 @type t :: %__MODULE__{
  @@ -34,7 +36,14 @@ defmodule Absinthe.Blueprint do
34 36 # Added by phases
35 37 errors: [Absinthe.Phase.Error.t],
36 38 flags: flags_t,
37 - resolution: Blueprint.Document.Resolution.t
39 + resolution: Blueprint.Document.Resolution.t,
40 + result: result_t,
41 + }
42 +
43 + @type result_t :: %{
44 + optional(:data) => term,
45 + optional(:errors) => [term],
46 + optional(:extensions) => term,
38 47 }
39 48
40 49 @type node_t ::
  @@ -8,14 +8,15 @@ defmodule Absinthe.Blueprint.Document.Resolution do
8 8 @type acc :: map
9 9
10 10 defstruct [
11 - type_cache: %{},
12 - validation: [],
11 + validation_errors: [],
13 12 result: nil,
14 - acc: %{}
13 + acc: %{},
14 + context: %{},
15 + root_value: %{},
15 16 ]
16 17
17 18 @type t :: %__MODULE__ {
18 - validation: [Phase.Error.t],
19 + validation_errors: [Phase.Error.t],
19 20 result: nil | Resolution.Object.t,
20 21 acc: acc,
21 22 }
  @@ -9,7 +9,8 @@ defmodule Absinthe.Blueprint.Document.Resolution.Leaf do
9 9 :emitter,
10 10 :value,
11 11 errors: [],
12 - flags: %{}
12 + flags: %{},
13 + extensions: %{},
13 14 ]
14 15
15 16 @type t :: %__MODULE__{
  @@ -17,6 +18,7 @@ defmodule Absinthe.Blueprint.Document.Resolution.Leaf do
17 18 value: Blueprint.Document.Resolution.node_t,
18 19 errors: [Phase.Error.t],
19 20 flags: Blueprint.flags_t,
21 + extensions: %{any => any},
20 22 }
21 23
22 24 end
Loading more files…