Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 11, 2020 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/333fc99bfc0525469ac028f2f1d08c4e to your computer and use it in GitHub Desktop.
Save velotiotech/333fc99bfc0525469ac028f2f1d08c4e to your computer and use it in GitHub Desktop.
pipeline :graphql do
plug Graphql.Context #custom plug written into lib/graphql_web/plug/context.ex folder
end
scope "/api" do
pipe_through(:graphql) #pipeline through which the request have to be routed
forward("/", Absinthe.Plug, schema: GraphqlWeb.Schema)
forward("/graphiql", Absinthe.Plug.GraphiQL, schema: GraphqlWeb.Schema)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment