Skip to content

Commit

Permalink
Merge pull request #35 from zino-app/patch-8
Browse files Browse the repository at this point in the history
Patch 8
  • Loading branch information
eusdima authored Jul 17, 2018
2 parents a3e2d03 + 3d0b4c5 commit 6e6aff7
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 20 deletions.
16 changes: 16 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"avatar_url": "https://avatars2.githubusercontent.com/u/4757453?v=4",
"profile": "http://eusdima.com",
"contributions": [
"bug",
"code",
"doc",
"example",
Expand All @@ -28,10 +29,12 @@
"avatar_url": "https://avatars3.githubusercontent.com/u/17142193?v=4",
"profile": "https://github.com/HofmannZ",
"contributions": [
"bug",
"code",
"doc",
"example",
"ideas",
"infra",
"review"
]
},
Expand All @@ -56,6 +59,19 @@
"example",
"ideas"
]
},
{
"login": "cal-pratt",
"name": "Cal Pratt",
"avatar_url": "https://avatars1.githubusercontent.com/u/7611406?v=4",
"profile": "http://stackoverflow.com/users/3280538/flkes",
"contributions": [
"bug",
"code",
"doc",
"example",
"ideas"
]
}
]
}
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ n/a

#### Fixes / Enhancements

- Query: changed Timer to Timer.periodic and one minor logic tweak.
- Query: changed `Timer` to `Timer.periodic` @eusdima
- Minor logic tweak @eusdima
- Use absolute paths in the library @HofmannZ

#### Docs

n/a
- Fix mutations example bug not updating star bool @cal-pratt

## [0.5.3] - July 13 2018

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![version][version-badge]][package]
[![MIT License][license-badge]][license]
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]](http://makeapullrequest.com)

[![Watch on GitHub][github-watch-badge]][github-watch]
Expand Down Expand Up @@ -230,9 +230,8 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
| [<img src="https://avatars2.githubusercontent.com/u/4757453?v=4" width="100px;"/><br /><sub><b>Eustatiu Dima</b></sub>](http://eusdima.com)<br />[💻](https://github.com/zino-app/graphql-flutter/commits?author=eusdima "Code") [📖](https://github.com/zino-app/graphql-flutter/commits?author=eusdima "Documentation") [💡](#example-eusdima "Examples") [🤔](#ideas-eusdima "Ideas, Planning, & Feedback") [👀](#review-eusdima "Reviewed Pull Requests") | [<img src="https://avatars3.githubusercontent.com/u/17142193?v=4" width="100px;"/><br /><sub><b>Zino Hofmann</b></sub>](https://github.com/HofmannZ)<br />[💻](https://github.com/zino-app/graphql-flutter/commits?author=HofmannZ "Code") [📖](https://github.com/zino-app/graphql-flutter/commits?author=HofmannZ "Documentation") [💡](#example-HofmannZ "Examples") [🤔](#ideas-HofmannZ "Ideas, Planning, & Feedback") [👀](#review-HofmannZ "Reviewed Pull Requests") | [<img src="https://avatars2.githubusercontent.com/u/15068096?v=4" width="100px;"/><br /><sub><b>Harkirat Saluja</b></sub>](https://github.com/jinxac)<br />[📖](https://github.com/zino-app/graphql-flutter/commits?author=jinxac "Documentation") [🤔](#ideas-jinxac "Ideas, Planning, & Feedback") | [<img src="https://avatars3.githubusercontent.com/u/5178217?v=4" width="100px;"/><br /><sub><b>Chris Muthig</b></sub>](https://github.com/camuthig)<br />[💻](https://github.com/zino-app/graphql-flutter/commits?author=camuthig "Code") [📖](https://github.com/zino-app/graphql-flutter/commits?author=camuthig "Documentation") [💡](#example-camuthig "Examples") [🤔](#ideas-camuthig "Ideas, Planning, & Feedback") |
| :---: | :---: | :---: | :---: |

| [<img src="https://avatars2.githubusercontent.com/u/4757453?v=4" width="100px;"/><br /><sub><b>Eustatiu Dima</b></sub>](http://eusdima.com)<br />[🐛](https://github.com/zino-app/graphql-flutter/issues?q=author%3Aeusdima "Bug reports") [💻](https://github.com/zino-app/graphql-flutter/commits?author=eusdima "Code") [📖](https://github.com/zino-app/graphql-flutter/commits?author=eusdima "Documentation") [💡](#example-eusdima "Examples") [🤔](#ideas-eusdima "Ideas, Planning, & Feedback") [👀](#review-eusdima "Reviewed Pull Requests") | [<img src="https://avatars3.githubusercontent.com/u/17142193?v=4" width="100px;"/><br /><sub><b>Zino Hofmann</b></sub>](https://github.com/HofmannZ)<br />[🐛](https://github.com/zino-app/graphql-flutter/issues?q=author%3AHofmannZ "Bug reports") [💻](https://github.com/zino-app/graphql-flutter/commits?author=HofmannZ "Code") [📖](https://github.com/zino-app/graphql-flutter/commits?author=HofmannZ "Documentation") [💡](#example-HofmannZ "Examples") [🤔](#ideas-HofmannZ "Ideas, Planning, & Feedback") [🚇](#infra-HofmannZ "Infrastructure (Hosting, Build-Tools, etc)") [👀](#review-HofmannZ "Reviewed Pull Requests") | [<img src="https://avatars2.githubusercontent.com/u/15068096?v=4" width="100px;"/><br /><sub><b>Harkirat Saluja</b></sub>](https://github.com/jinxac)<br />[📖](https://github.com/zino-app/graphql-flutter/commits?author=jinxac "Documentation") [🤔](#ideas-jinxac "Ideas, Planning, & Feedback") | [<img src="https://avatars3.githubusercontent.com/u/5178217?v=4" width="100px;"/><br /><sub><b>Chris Muthig</b></sub>](https://github.com/camuthig)<br />[💻](https://github.com/zino-app/graphql-flutter/commits?author=camuthig "Code") [📖](https://github.com/zino-app/graphql-flutter/commits?author=camuthig "Documentation") [💡](#example-camuthig "Examples") [🤔](#ideas-camuthig "Ideas, Planning, & Feedback") | [<img src="https://avatars1.githubusercontent.com/u/7611406?v=4" width="100px;"/><br /><sub><b>Cal Pratt</b></sub>](http://stackoverflow.com/users/3280538/flkes)<br />[🐛](https://github.com/zino-app/graphql-flutter/issues?q=author%3Acal-pratt "Bug reports") [💻](https://github.com/zino-app/graphql-flutter/commits?author=cal-pratt "Code") [📖](https://github.com/zino-app/graphql-flutter/commits?author=cal-pratt "Documentation") [💡](#example-cal-pratt "Examples") [🤔](#ideas-cal-pratt "Ideas, Planning, & Feedback") |
| :---: | :---: | :---: | :---: | :---: |
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome!
Expand Down
10 changes: 5 additions & 5 deletions lib/graphql_flutter.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
library graphql_flutter;

export './src/client.dart';
export 'package:graphql_flutter/src/client.dart';

export './src/cache/in_memory.dart';
export 'package:graphql_flutter/src/cache/in_memory.dart';

export './src/widgets/query.dart';
export './src/widgets/mutation.dart';
export './src/widgets/cache_provider.dart';
export 'package:graphql_flutter/src/widgets/query.dart';
export 'package:graphql_flutter/src/widgets/mutation.dart';
export 'package:graphql_flutter/src/widgets/cache_provider.dart';
5 changes: 3 additions & 2 deletions lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'dart:convert';

import 'package:http/http.dart' as http;

import './cache/in_memory.dart';
import 'package:graphql_flutter/src/cache/in_memory.dart';

Client client;

Expand Down Expand Up @@ -74,7 +74,8 @@ class Client {

if (jsonResponse['errors'] != null && jsonResponse['errors'].length > 0) {
throw new Exception(
'Error returned by the server in the query' + jsonResponse['errors'].toString(),
'Error returned by the server in the query' +
jsonResponse['errors'].toString(),
);
}

Expand Down
5 changes: 3 additions & 2 deletions lib/src/widgets/cache_provider.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import 'package:flutter/material.dart';
import '../client.dart';

import 'package:graphql_flutter/src/client.dart';

class CacheProvider extends StatefulWidget {
const CacheProvider({
Key key,
final Key key,
@required this.child,
}) : super(key: key);

Expand Down
4 changes: 2 additions & 2 deletions lib/src/widgets/mutation.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/widgets.dart';

import '../client.dart';
import 'package:graphql_flutter/src/client.dart';

typedef void RunMutation(Map<String, dynamic> variables);

Expand All @@ -16,7 +16,7 @@ typedef Widget MutationBuilder(
class Mutation extends StatefulWidget {
Mutation(
this.mutation, {
Key key,
final Key key,
@required this.builder,
this.onCompleted,
}) : super(key: key);
Expand Down
7 changes: 4 additions & 3 deletions lib/src/widgets/query.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'package:flutter/widgets.dart';

import '../client.dart';
import 'package:graphql_flutter/src/client.dart';

typedef Widget QueryBuilder({
@required bool loading,
Expand All @@ -12,7 +12,7 @@ typedef Widget QueryBuilder({
class Query extends StatefulWidget {
Query(
this.query, {
Key key,
final Key key,
this.variables = const {},
@required this.builder,
this.pollInterval,
Expand All @@ -31,9 +31,10 @@ class QueryState extends State<Query> {
bool loading = true;
Map<String, dynamic> data = {};
String error = '';

bool initialFetch = false;
Duration pollInterval;
Timer pollTimer;
bool initialFetch = false;
Map currentVariables = new Map();

@override
Expand Down

0 comments on commit 6e6aff7

Please sign in to comment.