-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(directive): support GQL directive
refactor scalars setter & getter refactor enum values
- Loading branch information
Showing
6 changed files
with
74 additions
and
95 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
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
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,31 @@ | ||
// Copyright Thomas Hourlier. All rights reserved. | ||
// Use of this source code is governed by a MIT-style license | ||
// that can be found in the LICENSE file. | ||
|
||
part of graphql_client.definitions; | ||
|
||
/// The GQL directive: `include` | ||
const String includeDirective = 'include'; | ||
|
||
/// The GQL directive: `skip` | ||
const String skipDirective = 'skip'; | ||
|
||
/// A GraphQL directive. | ||
/// | ||
/// It could be applied as a mixin on a [GQLField]. | ||
/// Eg. | ||
/// A GQL query with a field using an directive. | ||
/// ``` | ||
/// query MyQuery { | ||
/// name @include(if: true) | ||
/// } | ||
/// ``` | ||
abstract class Directives implements GQLField { | ||
/// The directive type. | ||
/// | ||
/// Should be [includeDirective] or [skipDirective] | ||
String get directive; | ||
|
||
/// The GQL directive. | ||
String get directiveValue; | ||
} |
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