-
Notifications
You must be signed in to change notification settings - Fork 11
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
Allow configuring multiple routes that point to different endpoints #8
Comments
I noticed this too; even my own projects based on rebing/graphql-laravel suffer this 😬 I was meant to look into for graphql-laravel but haven't found time yet. |
In order to make this happen, I think we would essentially need to switch the configuration from the current format into one that returns configurations for multiple routes. -return ['route' => ['uri' => '/graphiql', ...], 'endpoint' => '/graphql', ...];
+return [
+ ['route' => ['uri' => '/graphiql/admin', ...]], 'endpoint' => '/graphql/admin', ...],
+ ['route' => [['uri' => '/graphiql/app', ...], 'endpoint' => '/graphql/app', ...],
+]; Then, the routes configuration file would need to iterate over those multiple routes and pass their config to the controller, which in turn passes the configuration values to the view. I am not looking to implement this change myself. but am open to pull requests. |
I adapted our fork to support multiple schemas dynamically in the routes.php, this works for us 😄 :
|
#11 gives a good idea of peoples expectations in this regard. Obviously, this package can't query random other packages config files. I wonder what we could do here, i.e. have package A (graphql-laravel) provide package B (laravel-graphiql) the information automatically to generate the appropriate routes. |
It seems that using this package we are not able to load different schemas in different endpoints, is that correct?
/~https://github.com/rebing/graphql-laravel/pull/986/files
The text was updated successfully, but these errors were encountered: