Closed renatomefi closed 6 years ago
auto_discover
is not commit yet so you should remove it.
it fails because Query doesn't exist. The user must define a Query before using it, this is normal behavior.
I've defined it and removed the auto discover, that's why it's a bit weird :/
Yes i agree but it is the same for doctrine, you can't use an entity without declaring it before. Leave "query: ~" and finish recipe by pointing to this page https://github.com/overblog/GraphQLBundle/blob/master/Resources/doc/definitions/index.md
I've got it to work like this:
overblog_graphql:
definitions:
schema:
query: Query
mappings:
types:
-
type: yaml # [ yaml, xml ] this is required right now but will accept null in future
dir: "%kernel.project_dir%/config/graphql"
query: ~ or schema: ~ doesn't work.
I'll put the Hello World and the docs page is already in the post install txt, so then it should be all good
@mcg-web Damn, we have an issue: https://symfony.sh/r/github.com/symfony/recipes-contrib/85
this query.types.yaml
doesn't work ?
We're required to use underlines so Query_types.yaml
so this should also be configurable... I'm also adding this.
@mcg-web thanks for submitting the fix, I've just tried again and I failed to get it working out of the box:
SYMFONY_ENDPOINT=https://symfony.sh/r/github.com/symfony/recipes-contrib/85 composer req cli:^3.3 webserver:^3.3 twig:^3.3 overblog/graphql-bundle:0.9.x-dev
Oh wait, for some reason I got the old graphql configuration file, might be cache somewhere
@mcg-web works perfectly! :)
The only problem I'm having is indeed with the recipe cache, are you having the same?
This cache thing is crazy, I've tried re-pushing everything and cleared my whole composer cache but I'm getting an old version of the recipe, I think I'll close and re-open the PR
There we go: Now it works perfectly and out of the box, hello world and etc: https://github.com/symfony/recipes-contrib/pull/94
thank you @renatomefi, I'll try it later :+1:
It works perfectly but we should find a way to remove graphiql requirement and example. I don't really have idea of how to do that right now
@mcg-web I think the best we can do is just point the user to the docs, or do you see other solutions?
Right now this is the best solution, we should also add a .gitignore (.gitkeep) to graphql types dir. Maybe in v0.10 we will find a better solution. I'm going to realese v0.9. So we can start working on the new version. Thanks for the help on flex.
@mcg-web I removed the default query, pointing the users now to
https://github.com/overblog/GraphQLBundle/blob/master/Resources/doc/definitions/index.md
Although I'm thinking about making a symfony flex post-installation doc page, but it can be done later
Thanks @renatomefi
Hello,
During the past few days I've been doing some work to make this bundle compatible with symfony flex, the related PRs are:
186 #187 #191
After that I was able to install the bundle easily on it, now I have a PR on symfony flex, please check it: https://github.com/symfony/recipes/pull/183 Edited: Check https://github.com/symfony/recipes-contrib/pull/85 for progress
Please check if it's accordingly to the bundle, I've added configuration for the routes and now it should work out of the box.
Also, releasing a new tag will help the process, since the recipes must determine the minimal version for the package