[day-03] configure router to expose graphql
Expose graphql schema through absinthe plug. Also expose graphiql interface to make it easier to test graphql schema.
This commit is contained in:
parent
1380b8b2e4
commit
a54d29ee61
@ -11,6 +11,13 @@ defmodule WabanexWeb.Router do
|
||||
get "/", IMCController, :index
|
||||
end
|
||||
|
||||
scope "/api" do
|
||||
pipe_through :api
|
||||
|
||||
forward "/graphql", Absinthe.Plug, schema: WabanexWeb.Schema
|
||||
forward "/graphiql", Absinthe.Plug.GraphiQL, schema: WabanexWeb.Schema
|
||||
end
|
||||
|
||||
# Enables LiveDashboard only for development
|
||||
#
|
||||
# If you want to use the LiveDashboard in production, you should put
|
||||
|
Loading…
x
Reference in New Issue
Block a user