-
Notifications
You must be signed in to change notification settings - Fork 83
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
@put directive doesn't work on master #73
Comments
I've managed to work around this issue in my project by adding the following to my schema: directive :put do
on([:field, :fragment_spread, :inline_fragment])
expand(fn
_, node ->
Absinthe.Blueprint.put_flag(node, :put, __MODULE__)
end)
end |
I see this as also happening with the Anyone else trying to workaround this, you can just copy the directive(s) you want directly from directive :action do
on [:query, :mutation, :subscription]
arg :mode, non_null(:action_mode)
expand fn %{mode: mode}, node ->
Absinthe.Blueprint.put_flag(node, {:action, mode}, __MODULE__)
end
end |
I had the same problem and it was resolved using With this solution you don't have to add the code to your schema because the import works properly. |
While trying to upgrade a project to use Absinthe 1.5, I ran into issues with the
@put
directive. When using:absinthe_controller
to decorate controller actions with a GQL query that uses@put
, my queries are now failing with the error"Unknown directive 'put'."
I replicated this on master with a failing test here: https://github.com/QuinnWilton/absinthe_phoenix/blob/quinn%2Fput-tests/test/absinthe/phoenix/controller_test.exs#L132
The text was updated successfully, but these errors were encountered: