-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
673 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# 0.13.8 | ||
|
||
- Fix bug in asset path resolution. | ||
|
||
# 0.13.7 | ||
|
||
- Support `.graphqls` files | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/graphql_codegen/test/assets/issue_318/builder_options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"noFlatLib": true | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/graphql_codegen/test/assets/issue_318/graphql/query1/q.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type Query { | ||
hello: String | ||
} | ||
|
||
query FetchHello { | ||
hello | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/graphql_codegen/test/assets/issue_318/graphql/query2/q.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type Query { | ||
hello: String | ||
} | ||
|
||
query FetchHello { | ||
hello | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/graphql_codegen/test/assets/issue_318/graphql/schema.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type Query { | ||
hello: String | ||
} | ||
|
||
query FetchHello { | ||
hello | ||
} |
147 changes: 147 additions & 0 deletions
147
packages/graphql_codegen/test/assets/issue_318/lib/query1/q.graphql.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
import 'package:gql/ast.dart'; | ||
|
||
class Query$FetchHello { | ||
Query$FetchHello({ | ||
this.hello, | ||
this.$__typename = 'Query', | ||
}); | ||
|
||
factory Query$FetchHello.fromJson(Map<String, dynamic> json) { | ||
final l$hello = json['hello']; | ||
final l$$__typename = json['__typename']; | ||
return Query$FetchHello( | ||
hello: (l$hello as String?), | ||
$__typename: (l$$__typename as String), | ||
); | ||
} | ||
|
||
final String? hello; | ||
|
||
final String $__typename; | ||
|
||
Map<String, dynamic> toJson() { | ||
final _resultData = <String, dynamic>{}; | ||
final l$hello = hello; | ||
_resultData['hello'] = l$hello; | ||
final l$$__typename = $__typename; | ||
_resultData['__typename'] = l$$__typename; | ||
return _resultData; | ||
} | ||
|
||
@override | ||
int get hashCode { | ||
final l$hello = hello; | ||
final l$$__typename = $__typename; | ||
return Object.hashAll([ | ||
l$hello, | ||
l$$__typename, | ||
]); | ||
} | ||
|
||
@override | ||
bool operator ==(Object other) { | ||
if (identical(this, other)) { | ||
return true; | ||
} | ||
if (!(other is Query$FetchHello) || runtimeType != other.runtimeType) { | ||
return false; | ||
} | ||
final l$hello = hello; | ||
final lOther$hello = other.hello; | ||
if (l$hello != lOther$hello) { | ||
return false; | ||
} | ||
final l$$__typename = $__typename; | ||
final lOther$$__typename = other.$__typename; | ||
if (l$$__typename != lOther$$__typename) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
} | ||
|
||
extension UtilityExtension$Query$FetchHello on Query$FetchHello { | ||
CopyWith$Query$FetchHello<Query$FetchHello> get copyWith => | ||
CopyWith$Query$FetchHello( | ||
this, | ||
(i) => i, | ||
); | ||
} | ||
|
||
abstract class CopyWith$Query$FetchHello<TRes> { | ||
factory CopyWith$Query$FetchHello( | ||
Query$FetchHello instance, | ||
TRes Function(Query$FetchHello) then, | ||
) = _CopyWithImpl$Query$FetchHello; | ||
|
||
factory CopyWith$Query$FetchHello.stub(TRes res) = | ||
_CopyWithStubImpl$Query$FetchHello; | ||
|
||
TRes call({ | ||
String? hello, | ||
String? $__typename, | ||
}); | ||
} | ||
|
||
class _CopyWithImpl$Query$FetchHello<TRes> | ||
implements CopyWith$Query$FetchHello<TRes> { | ||
_CopyWithImpl$Query$FetchHello( | ||
this._instance, | ||
this._then, | ||
); | ||
|
||
final Query$FetchHello _instance; | ||
|
||
final TRes Function(Query$FetchHello) _then; | ||
|
||
static const _undefined = <dynamic, dynamic>{}; | ||
|
||
TRes call({ | ||
Object? hello = _undefined, | ||
Object? $__typename = _undefined, | ||
}) => | ||
_then(Query$FetchHello( | ||
hello: hello == _undefined ? _instance.hello : (hello as String?), | ||
$__typename: $__typename == _undefined || $__typename == null | ||
? _instance.$__typename | ||
: ($__typename as String), | ||
)); | ||
} | ||
|
||
class _CopyWithStubImpl$Query$FetchHello<TRes> | ||
implements CopyWith$Query$FetchHello<TRes> { | ||
_CopyWithStubImpl$Query$FetchHello(this._res); | ||
|
||
TRes _res; | ||
|
||
call({ | ||
String? hello, | ||
String? $__typename, | ||
}) => | ||
_res; | ||
} | ||
|
||
const documentNodeQueryFetchHello = DocumentNode(definitions: [ | ||
OperationDefinitionNode( | ||
type: OperationType.query, | ||
name: NameNode(value: 'FetchHello'), | ||
variableDefinitions: [], | ||
directives: [], | ||
selectionSet: SelectionSetNode(selections: [ | ||
FieldNode( | ||
name: NameNode(value: 'hello'), | ||
alias: null, | ||
arguments: [], | ||
directives: [], | ||
selectionSet: null, | ||
), | ||
FieldNode( | ||
name: NameNode(value: '__typename'), | ||
alias: null, | ||
arguments: [], | ||
directives: [], | ||
selectionSet: null, | ||
), | ||
]), | ||
), | ||
]); |
Oops, something went wrong.