We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following syntax was working in 1.4.16, however after updating to 1.5.1, it no longer works:
object :user do field :name, :string field :is_email_public, :boolean field :phone, :string, meta: [private: true] field :email, :string, meta: [private: & !&1.is_email_public] field :always_private, :string, meta: [private: true, rule: :private] end
== Compilation error in file test/middlewares/field_authorization_test.exs == ** (KeyError) key :meta not found in: %Absinthe.Blueprint.Schema.FieldDefinition{__private__: [], __reference__: %{location: %{file: "/Users/gabrielpra/Projects/rajska/test/middlewares/field_authorization_test.exs", line: 80}, module: Rajska.FieldAuthorizationTest.Schema}, arguments: [], complexity: nil, config: nil, default_value: nil, deprecation: nil, description: nil, directives: [], errors: [], flags: %{}, function_ref: nil, identifier: :phone, middleware: [], module: Rajska.FieldAuthorizationTest.Schema, name: "phone", source_location: nil, triggers: [], type: :string} (stdlib 3.11.2) :maps.update(:meta, [private: true], %Absinthe.Blueprint.Schema.FieldDefinition{__private__: [], __reference__: %{location: %{file: "/Users/gabrielpra/Projects/rajska/test/middlewares/field_authorization_test.exs", line: 80}, module: Rajska.FieldAuthorizationTest.Schema}, arguments: [], complexity: nil, config: nil, default_value: nil, deprecation: nil, description: nil, directives: [], errors: [], flags: %{}, function_ref: nil, identifier: :phone, middleware: [], module: Rajska.FieldAuthorizationTest.Schema, name: "phone", source_location: nil, triggers: [], type: :string}) (absinthe 1.5.1) lib/absinthe/blueprint/schema/field_definition.ex:7: anonymous fn/2 in Absinthe.Blueprint.Schema.FieldDefinition.__struct__/1 (elixir 1.10.2) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3 (absinthe 1.5.1) lib/absinthe/blueprint/schema/field_definition.ex:7: Absinthe.Blueprint.Schema.FieldDefinition.__struct__/1 (elixir 1.10.2) lib/kernel.ex:2168: Kernel.struct!/2 (absinthe 1.5.1) lib/absinthe/schema/notation.ex:1508: Absinthe.Schema.Notation.scoped_def/5 (absinthe 1.5.1) expanding macro: Absinthe.Schema.Notation.field/3 test/middlewares/field_authorization_test.exs:80: Rajska.FieldAuthorizationTest.Schema (module) (absinthe 1.5.1) expanding macro: Absinthe.Schema.Notation.object/2 test/middlewares/field_authorization_test.exs:74: Rajska.FieldAuthorizationTest.Schema (module) (elixir 1.10.2) lib/kernel/parallel_compiler.ex:396: Kernel.ParallelCompiler.require_file/2 (elixir 1.10.2) lib/kernel/parallel_compiler.ex:306: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7
Using the meta/1 syntax still compiles, though:
meta/1
object :user do field :name, :string field :is_email_public, :boolean field :phone, :string do meta([private: true]) end field :email, :string do meta([private: & !&1.is_email_public]) end field :always_private, :string do meta([private: true, rule: :private]) end end
The text was updated successfully, but these errors were encountered:
any news about this?
Sorry, something went wrong.
Fixed with #973
No branches or pull requests
Environment
Expected behavior
The following syntax was working in 1.4.16, however after updating to 1.5.1, it no longer works:
Error
Using the
meta/1
syntax still compiles, though:The text was updated successfully, but these errors were encountered: