Skip to content
New issue

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

Inlined meta(s) do not work with field macro anymore #958

Closed
tlvenn opened this issue Jul 14, 2020 · 3 comments
Closed

Inlined meta(s) do not work with field macro anymore #958

tlvenn opened this issue Jul 14, 2020 · 3 comments
Assignees
Labels

Comments

@tlvenn
Copy link
Member

tlvenn commented Jul 14, 2020

Trying to upgrade our app / schema to the latest 1.5 release (still using 1.4 for now) and I got a compilation error in our schema regarding the usage of meta with field such as:

input do
  field(:country_id, :id, meta: [type: Jumpn.SupportedCountry])
end

The error:

KeyError) key :meta not found in: %Absinthe.Blueprint.Schema.FieldDefinition{__private__: [], __reference__: %{location: %{file: ".../activity/schema.ex", line: 29}, module: Jumpn.Schema.Activity}, arguments: [], complexity: nil, config: nil, default_value: nil, deprecation: nil, description: nil, directives: [], errors: [], flags: %{}, function_ref: nil, identifier: :country_id, middleware: [], module: Jumpn.Schema.Activity, name: "country_id", source_location: nil, triggers: [], type: :id}
    (stdlib 3.13) :maps.update(:meta, [type: Jumpn.SupportedCountry], %Absinthe.Blueprint.Schema.FieldDefinition{__private__: [], __reference__: %{location: %{file: ".../activity/schema.ex", line: 29}, module: Jumpn.Schema.Activity}, arguments: [], complexity: nil, config: nil, default_value: nil, deprecation: nil, description: nil, directives: [], errors: [], flags: %{}, function_ref: nil, identifier: :country_id, middleware: [], module: Jumpn.Schema.Activity, name: "country_id", source_location: nil, triggers: [], type: :id})
    lib/absinthe/blueprint/schema/field_definition.ex:7: anonymous fn/2 in Absinthe.Blueprint.Schema.FieldDefinition.__struct__/1

Might be related with #928

@benwilson512 benwilson512 self-assigned this Jul 14, 2020
@jeroenvisser101
Copy link
Contributor

It's for sure related to #927

@tlvenn
Copy link
Member Author

tlvenn commented Aug 31, 2020

Hi @benwilson512 , is there any chance you would have a little bit of spare time to look into this ? Thanks a lot in advance.

@tlvenn
Copy link
Member Author

tlvenn commented Sep 30, 2020

Fixed with #973

@tlvenn tlvenn closed this as completed Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants