Closed mumuWeng closed 7 years ago
Wow, I never thought of this!
It looks like it might be possible, see this stack overflow response for using the as
option:
http://stackoverflow.com/a/33419438/1741654
You could try the same thing here. For example:
mount GraphiQL::Rails::Engine, as: "graphiql_1", at: "/server1/graphiql", graphql_path: 'http://server1/api/graphql'
mount GraphiQL::Rails::Engine, as: "graphiql_2", at: "/server2/graphiql", graphql_path: 'http://server2/api/graphql/'
Could you give that a try? Let me know what you find!
Works like a charm! Thanks for the help 😄
I am building a documentation server and would like to mount multiple GraphiQL that points to different GraphQL servers at once and use iframe to put it somewhere on my page. So in my
routes.rb
, I did thisBut I got the following error,
Not sure if I did it wrong or is this not supported? Any help would be appreciated!