Current section

122 Versions

Jump to

Compare versions

31 files changed
+62 additions
-407 deletions
  @@ -11,11 +11,12 @@ For changes pre-v1.5 see the [v1.4](https://github.com/absinthe-graphql/absinthe
11 11 - Breaking Change: Scalar outputs are now type checked and will raise exceptions if the result tries to send the wrong data type in the result.
12 12 - Breaking Change: `telemetry` event names [changed](https://github.com/absinthe-graphql/absinthe/pull/782) from the `alpha` to match an emerging naming convention for tracing.
13 13 - Breaking Change: Added phase to check validity of field names according to graphql spec. Might break existing schema's. Remove the `Absinthe.Phase.Schema.Validation.NamesMustBeValid` from the schema pipeline if you want to ignore this.
14 - - Breaking Change: To match the GraphQL spec, we [no longer](https://github.com/absinthe-graphql/absinthe/pull/816) add a non-null error when a resolver on a non-null field explicitly returns it's own error.
14 + - Breaking Change: To match the GraphQL spec, we [no longer](https://github.com/absinthe-graphql/absinthe/pull/816) add a non-null error when a resolver on a non-null field explicitly returns its own error.
15 + - Breaking Change: Removed `Absinthe.Traversal` module
15 16
16 17 ## v1.5.0 (Alpha)
17 18
18 - Alpha 0 note: 1.5.0 alpha is safe to use on existing schemas. However, there are no schema validations at the moment, so when writing new ones you may get undefined behaviour if you write an invalid schema.
19 + Alpha 0 note: 1.5.0 alpha is safe to use on existing schemas. However, there are no schema validations at the moment, so when writing new ones you may get undefined behaviour if you write an invalid schema.
19 20
20 21 - COLUMN NUMBERS! The Absinthe Lexer has been rewritten using `nimble_parsec` and now Absinthe includes column information.
21 22 - Complete rewrite of schema internals. This fixes a number of long standing bugs, and provides a variety of new features
  @@ -7,8 +7,8 @@
7 7 <<"lib/mix/tasks/absinthe.schema.sdl.ex">>,
8 8 <<"lib/mix/tasks/absinthe.schema.json.ex">>,<<"lib/absinthe.ex">>,
9 9 <<"lib/absinthe">>,<<"lib/absinthe/adapter.ex">>,
10 - <<"lib/absinthe/traversal.ex">>,<<"lib/absinthe/blueprint.ex">>,
11 - <<"lib/absinthe/middleware">>,<<"lib/absinthe/middleware/batch.ex">>,
10 + <<"lib/absinthe/blueprint.ex">>,<<"lib/absinthe/middleware">>,
11 + <<"lib/absinthe/middleware/batch.ex">>,
12 12 <<"lib/absinthe/middleware/telemetry.ex">>,
13 13 <<"lib/absinthe/middleware/map_get.ex">>,
14 14 <<"lib/absinthe/middleware/async.ex">>,
  @@ -18,8 +18,7 @@
18 18 <<"lib/absinthe/pipeline/error_result.ex">>,
19 19 <<"lib/absinthe/complexity.ex">>,<<"lib/absinthe/phase">>,
20 20 <<"lib/absinthe/phase/blueprint.ex">>,<<"lib/absinthe/phase/telemetry.ex">>,
21 - <<"lib/absinthe/phase/.DS_Store">>,<<"lib/absinthe/phase/error.ex">>,
22 - <<"lib/absinthe/phase/document">>,
21 + <<"lib/absinthe/phase/error.ex">>,<<"lib/absinthe/phase/document">>,
23 22 <<"lib/absinthe/phase/document/variables.ex">>,
24 23 <<"lib/absinthe/phase/document/missing_literals.ex">>,
25 24 <<"lib/absinthe/phase/document/complexity">>,
  @@ -70,7 +69,6 @@
70 69 <<"lib/absinthe/phase/subscription/result.ex">>,
71 70 <<"lib/absinthe/phase/parse.ex">>,<<"lib/absinthe/phase/schema">>,
72 71 <<"lib/absinthe/phase/schema/field_imports.ex">>,
73 - <<"lib/absinthe/phase/schema/.DS_Store">>,
74 72 <<"lib/absinthe/phase/schema/hydrate.ex">>,
75 73 <<"lib/absinthe/phase/schema/build.ex">>,
76 74 <<"lib/absinthe/phase/schema/validation.ex">>,
  @@ -103,11 +101,10 @@
103 101 <<"lib/absinthe/phase/validation.ex">>,<<"lib/absinthe/phase/debug.ex">>,
104 102 <<"lib/absinthe/phase/validation">>,
105 103 <<"lib/absinthe/phase/validation/known_type_names.ex">>,
106 - <<"lib/absinthe/.DS_Store">>,<<"lib/absinthe/type.ex">>,
107 - <<"lib/absinthe/test.ex">>,<<"lib/absinthe/logger.ex">>,
108 - <<"lib/absinthe/phase.ex">>,<<"lib/absinthe/utils">>,
109 - <<"lib/absinthe/utils/suggestion.ex">>,<<"lib/absinthe/language">>,
110 - <<"lib/absinthe/language/boolean_value.ex">>,
104 + <<"lib/absinthe/type.ex">>,<<"lib/absinthe/test.ex">>,
105 + <<"lib/absinthe/logger.ex">>,<<"lib/absinthe/phase.ex">>,
106 + <<"lib/absinthe/utils">>,<<"lib/absinthe/utils/suggestion.ex">>,
107 + <<"lib/absinthe/language">>,<<"lib/absinthe/language/boolean_value.ex">>,
111 108 <<"lib/absinthe/language/variable_definition.ex">>,
112 109 <<"lib/absinthe/language/float_value.ex">>,
113 110 <<"lib/absinthe/language/schema_declaration.ex">>,
  @@ -148,23 +145,17 @@
148 145 <<"lib/absinthe/adapter/passthrough.ex">>,
149 146 <<"lib/absinthe/adapter/language_conventions.ex">>,
150 147 <<"lib/absinthe/adapter/strict_language_conventions.ex">>,
151 - <<"lib/absinthe/introspection">>,<<"lib/absinthe/introspection/field.ex">>,
152 - <<"lib/absinthe/introspection/kind.ex">>,<<"lib/absinthe/subscription.ex">>,
153 - <<"lib/absinthe/subscription">>,<<"lib/absinthe/subscription/local.ex">>,
148 + <<"lib/absinthe/introspection">>,<<"lib/absinthe/introspection/kind.ex">>,
149 + <<"lib/absinthe/subscription.ex">>,<<"lib/absinthe/subscription">>,
150 + <<"lib/absinthe/subscription/local.ex">>,
154 151 <<"lib/absinthe/subscription/proxy.ex">>,
155 152 <<"lib/absinthe/subscription/supervisor.ex">>,
156 - <<"lib/absinthe/subscription/.DS_Store">>,
157 153 <<"lib/absinthe/subscription/proxy_supervisor.ex">>,
158 154 <<"lib/absinthe/subscription/pubsub.ex">>,<<"lib/absinthe/schema">>,
159 - <<"lib/absinthe/schema/.DS_Store">>,<<"lib/absinthe/schema/notation.ex">>,
160 - <<"lib/absinthe/schema/error.ex">>,
161 - <<"lib/absinthe/schema/verification.ex">>,
155 + <<"lib/absinthe/schema/notation.ex">>,<<"lib/absinthe/schema/error.ex">>,
162 156 <<"lib/absinthe/schema/prototype">>,
163 157 <<"lib/absinthe/schema/prototype/notation.ex">>,
164 - <<"lib/absinthe/schema/prototype.ex">>,
165 - <<"lib/absinthe/schema/verification">>,
166 - <<"lib/absinthe/schema/verification/unions.ex">>,
167 - <<"lib/absinthe/schema/notation">>,
158 + <<"lib/absinthe/schema/prototype.ex">>,<<"lib/absinthe/schema/notation">>,
168 159 <<"lib/absinthe/schema/notation/error.ex">>,
169 160 <<"lib/absinthe/schema/notation/sdl.ex">>,
170 161 <<"lib/absinthe/schema/notation/definition.ex">>,
  @@ -178,18 +169,16 @@
178 169 <<"lib/absinthe/type/built_ins/scalars.ex">>,
179 170 <<"lib/absinthe/type/built_ins/directives.ex">>,
180 171 <<"lib/absinthe/type/built_ins/introspection.ex">>,
181 - <<"lib/absinthe/type/.DS_Store">>,<<"lib/absinthe/type/field.ex">>,
182 - <<"lib/absinthe/type/argument.ex">>,<<"lib/absinthe/type/fetch.ex">>,
183 - <<"lib/absinthe/type/enum">>,<<"lib/absinthe/type/enum/value.ex">>,
184 - <<"lib/absinthe/type/list.ex">>,<<"lib/absinthe/type/object.ex">>,
185 - <<"lib/absinthe/type/custom.ex">>,<<"lib/absinthe/type/input_object.ex">>,
186 - <<"lib/absinthe/type/enum.ex">>,<<"lib/absinthe/type/non_null.ex">>,
187 - <<"lib/absinthe/type/union.ex">>,<<"lib/absinthe/type/custom">>,
188 - <<"lib/absinthe/type/custom/decimal.ex">>,
172 + <<"lib/absinthe/type/field.ex">>,<<"lib/absinthe/type/argument.ex">>,
173 + <<"lib/absinthe/type/fetch.ex">>,<<"lib/absinthe/type/enum">>,
174 + <<"lib/absinthe/type/enum/value.ex">>,<<"lib/absinthe/type/list.ex">>,
175 + <<"lib/absinthe/type/object.ex">>,<<"lib/absinthe/type/custom.ex">>,
176 + <<"lib/absinthe/type/input_object.ex">>,<<"lib/absinthe/type/enum.ex">>,
177 + <<"lib/absinthe/type/non_null.ex">>,<<"lib/absinthe/type/union.ex">>,
178 + <<"lib/absinthe/type/custom">>,<<"lib/absinthe/type/custom/decimal.ex">>,
189 179 <<"lib/absinthe/type/reference.ex">>,<<"lib/absinthe/type/directive.ex">>,
190 180 <<"lib/absinthe/resolution">>,<<"lib/absinthe/resolution/helpers.ex">>,
191 - <<"lib/absinthe/resolution/projector.ex">>,<<"lib/absinthe/traversal">>,
192 - <<"lib/absinthe/traversal/node.ex">>,<<"lib/absinthe/schema.ex">>,
181 + <<"lib/absinthe/resolution/projector.ex">>,<<"lib/absinthe/schema.ex">>,
193 182 <<"lib/absinthe/middleware.ex">>,<<"lib/absinthe/utils.ex">>,
194 183 <<"lib/absinthe/language.ex">>,<<"lib/absinthe/pipeline.ex">>,
195 184 <<"lib/absinthe/introspection.ex">>,<<"lib/absinthe/blueprint">>,
  @@ -284,4 +273,4 @@
284 273 {<<"optional">>,true},
285 274 {<<"repository">>,<<"hexpm">>},
286 275 {<<"requirement">>,<<"~> 1.0">>}]]}.
287 - {<<"version">>,<<"1.5.0-rc.1">>}.
276 + {<<"version">>,<<"1.5.0-rc.2">>}.
  @@ -1,76 +0,0 @@
1 - defmodule Absinthe.Introspection.Field do
2 - @moduledoc false
3 -
4 - use Absinthe.Schema.Notation
5 -
6 - alias Absinthe.Schema
7 - alias Absinthe.Type
8 -
9 - def meta("typename") do
10 - %Type.Field{
11 - name: "__typename",
12 - type: :string,
13 - description: "The name of the object type currently being queried.",
14 - middleware: [
15 - Absinthe.Resolution.resolver_spec(fn
16 - _, %{parent_type: %Type.Object{} = type} ->
17 - {:ok, type.name}
18 -
19 - _, %{source: source, parent_type: %Type.Interface{} = iface} = env ->
20 - case Type.Interface.resolve_type(iface, source, env) do
21 - nil ->
22 - {:error, "Could not resolve type of concrete " <> iface.name}
23 -
24 - type ->
25 - {:ok, type.name}
26 - end
27 -
28 - _, %{source: source, parent_type: %Type.Union{} = union} = env ->
29 - case Type.Union.resolve_type(union, source, env) do
30 - nil ->
31 - {:error, "Could not resolve type of concrete " <> union.name}
32 -
33 - type ->
34 - {:ok, type.name}
35 - end
36 - end)
37 - ]
38 - }
39 - end
40 -
41 - def meta("type") do
42 - %Type.Field{
43 - name: "__type",
44 - type: :__type,
45 - description: "Represents scalars, interfaces, object types, unions, enums in the system",
46 - args: %{
47 - name: %Type.Argument{
48 - identifier: :name,
49 - name: "name",
50 - type: %Absinthe.Type.NonNull{of_type: :string},
51 - description: "The name of the type to introspect"
52 - }
53 - },
54 - middleware: [
55 - Absinthe.Resolution.resolver_spec(fn %{name: name}, %{schema: schema} ->
56 - {:ok, Schema.lookup_type(schema, name)}
57 - end)
58 - ]
59 - }
60 - end
61 -
62 - def meta("schema") do
63 - %Type.Field{
64 - name: "__schema",
65 - type: :__schema,
66 - description: "Represents the schema",
67 - middleware: [
68 - Absinthe.Resolution.resolver_spec(fn _, %{schema: schema} ->
69 - {:ok, schema}
70 - end)
71 - ]
72 - }
73 - end
74 -
75 - def meta(_), do: nil
76 - end
  @@ -27,10 +27,4 @@ defmodule Absinthe.Language.Argument do
27 27 defp source_location(%{loc: nil}), do: nil
28 28 defp source_location(%{loc: loc}), do: Blueprint.SourceLocation.at(loc)
29 29 end
30 -
31 - defimpl Absinthe.Traversal.Node do
32 - def children(node, _schema) do
33 - [node.value]
34 - end
35 - end
36 30 end
Loading more files…