-
-
Notifications
You must be signed in to change notification settings - Fork 628
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
How can I use graphql-flutter with MultiProvider #339
Comments
@HofmannZ you did it for our apps, can you share with him how you did the multi provider? |
One solution i can think of is to pass the client itself, something like: MultiProvider(
providers: [
Provider<ValueNotifier<GraphQLClient>>.value(value: client),
],
child: someWidget,
) And the either use the dart client or create On a package level, may be we can have something like |
yes, I use |
Can you guys give a more detailed example on how to use it with |
For now, the easiest way I can think of is using GraphQLProvider as a child of MultiProvider(
providers: [
Provider<Foo>.value(value: foo),
Provider<Bar>.value(value: bar),
Provider<Baz>.value(value: baz),
],
child: GraphQLProvider(...),
) |
how did you solve it please? |
How can I do this above? Just want to make auth server & graphQL service together.
I was plan to separate multi service(assume include
Auth
,graphQL
,store
and so on ) useMultiProvider
, so I'd like useGraphQLProvider
like this too, but it gives error. Any suggestion for separation like these?The text was updated successfully, but these errors were encountered: