| Q | A
| ---------------- | -----
| Bug report? | yes
| Feature request? | no
| BC Break report? | no
| RFC? | no
| Version/Branch | 0.9.1
Hi,
I have installed this bundle and followed the examples at https://github.com/symfony/recipes-contrib/tree/master/overblog/graphql-bundle/0.9 and https://github.com/mcg-web/graphql-symfony-doctrine-sandbox but I keep getting:
(1/1)聽ForbiddenOverwriteExceptionConfiguration path "overblog_graphql_types.Bladibla" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.
My config is as follows:
# app/config/config.yml
overblog_graphql:
definitions:
internal_error_message: "An error occurred, please retry later or contact us!"
use_classloader_listener: false
cache_dir: '%kernel.root_dir%/../src/UserInterface/Mobile'
class_namespace: "Foo\\Bar\\UserInterface\\Mobile"
config_validation: "%kernel.debug%"
schema:
query: Query
mutation: Mutation
mappings:
auto_discover: false # to disable bundles and root dir auto discover
types:
-
type: yaml
dir: '%kernel.root_dir%/../lib/config-bundle/src/Resources/config/user_interface/mobile'
-
type: yaml
dir: '%kernel.root_dir%/../lib/config-bundle/src/Resources/config/user_interface/mobile/bla_di_bla'
# lib/config-bundle/src/Resources/config/user_interface/mobile/Query.types.yml
Query:
type: object
config:
description: "..."
fields:
bla_di_bla:
type: "Bladibla"
args:
id:
description: "id of the Bladibla"
type: "Int!"
resolve: "@=resolver('bla_di_bla', [args])"
# lib/config-bundle/src/Resources/config/user_interface/mobile/bla_di_bla/Bladibla.types.yml
Bladibla:
type: object
config:
description: "..."
fields:
id:
type: "Int!"
description: "The id of the Bladibla."
title:
type: "String"
description: "The title of the Bladibla."
# resolver.yml
services:
bar.user_interface.graphql.bla_di_bla.resolver:
alias: bar.core.bla_di_bla.repository.bla_di_bla
tags:
- { name: overblog_graphql.resolver, alias: "bla_di_bla", method: "get" }
Someone has any idea what is going wrong?
Tkx in advance.
Hi, it seems that Bladibla type is defined in two different file. This is not allow to keep schema easy to read. this https://github.com/mcg-web/graphql-symfony-doctrine-sandbox is outdated, must create a new sandbox one of those days :)
Yes, it seems it is defined in 2 places, but i can't see where... :(
You don't have a backup yaml file in your config dir? Or you maybe mapping same dir twice (note that sub dir are automatically search).
Hahaaaaaaa!!!
Indeed, it might be the case of the sub directory getting included twice!!
Will try when i get home!
If this is the case then this is a bug and will be fix as fast as possible. I'm waiting for your feedback :+1:
That was the issue, indeed!!
Thanks for your help with this.
The fix will be release in 0.9.2 thank you for your help :+1: