Created
April 30, 2019 13:23
-
-
Save sultaniman/82ab34e171eb59fae8a9ebbb71db2137 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this to your schema module | |
# if it's a field for the mutation object, add this middleware to the end | |
def middleware(middleware, _field, %{identifier: :mutation}) do | |
middleware ++ [Idp.Middlewares.HandleAPIErrors] | |
end | |
# if it's any other object keep things as is | |
def middleware(middleware, _field, _object), do: middleware |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment