Closed hourliert closed 7 years ago
Fixes #1 .
Caveats:
Sample of code:
final client = new Client(); final logger = new Logger('GraphQLClient'); final graphQLClient = new GraphQLClient( client: client, logger: logger, endPoint: endPoint, )..loadSchema(GithubGraphQLSchema); //language=GraphQL String gqlQuery = ''' query { viewer { avatarUrl(size: 200) login bio @include(if: false) gists(first: 5) { nodes { ...ShortGist } } } } fragment ShortGist on Gist { name description } '''; var res = await graphQLClient.execute<GithubGraphQLSchema>( gqlQuery, headers: {'Authorization': 'bearer $apiToken'}, ); print(res.viewer.avatarUrl.value); print(res.viewer.gists.nodes.first.name.value);
Fixes #1 .
Caveats:
Sample of code: