youshido-php/GraphQLBundle

Doctrine instance in resolvers

EnoahNetzach opened this issue · 5 comments

Hi, I really appreciate this projects, but I am currently finding an obstacle: how am I supposed to make queries to doctrine in a resolver?

Should the bundle pass doctrine/composer (the latter preferably) down to the Schema instance from the controller?

Thanks! ^_^

Hi,
You must use ContainerAwareTypes, look here https://github.com/Youshido/GraphQLBundle/tree/master/Type

love you <3

As a quick response – you can extend from AbstractContainerAwareObjectType, but we'll make an example of that by the end of this week.

@viniychuk that will be really useful ;)

thank you both so much