Skip to content
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

Unable to resolve providers - typeorm typedi integration #243

Closed
itxuye opened this issue Dec 28, 2018 · 9 comments
Closed

Unable to resolve providers - typeorm typedi integration #243

itxuye opened this issue Dec 28, 2018 · 9 comments

Comments

@itxuye
Copy link

itxuye commented Dec 28, 2018

How to use graphql-modules with typeorm and typedi ,now I got some problems .

GraphQL-Modules Error: Dependency Provider Not Found!
      - Provider #Repository couldn't be injected into Provider #Users
      -- Provider #Repository is not provided in #Module 591455874290757 scope!

      Possible solutions:
      - Make sure you have imported the module of Provider #Repository in the module of Provider 
@ardatan
Copy link
Collaborator

ardatan commented Dec 28, 2018

GraphQL-Modules has built-in dependency injection system, so you might not need any other dependency injection system/logic. If you don’t provide Repository in any module inside application, this error is expected. So, could you share more details or reproduce a repo?

@itxuye itxuye closed this as completed Jan 2, 2019
@Urigo
Copy link
Owner

Urigo commented Jan 4, 2019

@itxuye can you share what did you end up doing?

@itxuye
Copy link
Author

itxuye commented Jan 4, 2019

@Urigo Finally , i didn't use typeorm-typedi-extentions , https://github.com/typeorm/typeorm-typedi-extensions , because i can't register a 3rd IOC container in graphql-modules.

@itxuye itxuye reopened this Jan 4, 2019
@ardatan
Copy link
Collaborator

ardatan commented Jan 4, 2019

You can export DI container of GraphQLModule using injector property, then pass it to TypeORM using useContainer function.

@itxuye
Copy link
Author

itxuye commented Jan 5, 2019

@ardatan Ok, thanks, i will try it .

@itxuye itxuye closed this as completed Jan 5, 2019
@Urigo
Copy link
Owner

Urigo commented Jan 5, 2019

if it's ok, I'll keep it open until we'll have an example somewhere that people can have a look at

@Urigo Urigo reopened this Jan 5, 2019
@iamclaytonray
Copy link
Contributor

Since the WhatsApp Clone was released today, we could probably close this issue now.

@ardatan ardatan closed this as completed Feb 22, 2019
@Cassianokunsch
Copy link

image

image

image

image

image

image

image

I have this problem and I can't solve it.

@walleXD
Copy link

walleXD commented Feb 29, 2020

@Cassianokunsch were you able to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants