Reputation: 41
I'm new to flutter and graphql, as a new one facing struggles on integration. It would be really thankfull if some one help me on this.
For develoment I tried to use graphql-faker, but seems still it has installation issue: https://github.com/graphql-kit/graphql-faker/issues/196#issuecomment-2065688689.
Then I tried with github api, but getting "invalid path error".
graphql.config.yml
{
"name": "Schema",
"schemaPath": "my.schema.json",
"extensions": {
"endpoints": {
"Default": {
"url": "https://api.github.com/graphql",
"introspect": true,
headers: {
Authorization: "Bearer Token"
}
}
}
}
}
can someone help me on this? And I have some doubt as a learner.
I follwoing the steps to integrate graphql from these docs: https://github.com/zino-hofmann/graphql-flutter/tree/main/packages/graphql_flutter, https://medium.com/@v.ditsyak/ultimate-toolchain-to-work-with-graphql-in-flutter-13aef79c6484.
There, we are using HttpLink, AuthLink, ValueNotifier to sync with server by giving the url and token. can we use graphql.config.yml for schema download and intial provider sync as a single source of turth?
Upvotes: 0
Views: 24