This repository has been archived by the owner on Feb 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Introspection): field descriptions
- Loading branch information
Adam Ivora
committed
Jun 26, 2017
1 parent
b3c3a07
commit eabd886
Showing
28 changed files
with
235 additions
and
133 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
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
17 changes: 17 additions & 0 deletions
17
src/GraphQLCore/Type/Complex/Builders/FieldDefinitionBuilder.cs
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,17 @@ | ||
namespace GraphQLCore.Type.Complex | ||
{ | ||
public class FieldDefinitionBuilder : FieldDefinitionBuilder<FieldDefinitionBuilder, GraphQLObjectTypeFieldInfo> | ||
{ | ||
public FieldDefinitionBuilder(GraphQLObjectTypeFieldInfo fieldInfo) | ||
: base(fieldInfo) | ||
{ | ||
} | ||
|
||
public FieldDefinitionBuilder OnChannel(string channelName) | ||
{ | ||
this.FieldInfo.Channel = channelName; | ||
|
||
return this; | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/GraphQLCore/Type/Complex/Builders/FieldDefinitionBuilder`2.cs
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,29 @@ | ||
namespace GraphQLCore.Type.Complex | ||
{ | ||
public abstract class FieldDefinitionBuilder<TDefinitionBuilder, TFieldInfo> | ||
where TFieldInfo : GraphQLFieldInfo | ||
where TDefinitionBuilder : FieldDefinitionBuilder<TDefinitionBuilder, TFieldInfo> | ||
{ | ||
protected TFieldInfo FieldInfo { get; } | ||
|
||
protected FieldDefinitionBuilder(TFieldInfo fieldInfo) | ||
{ | ||
this.FieldInfo = fieldInfo; | ||
} | ||
|
||
public TDefinitionBuilder ResolveWithUnion<TUnionType>() | ||
where TUnionType : GraphQLUnionType | ||
{ | ||
this.FieldInfo.SystemType = typeof(TUnionType); | ||
|
||
return (TDefinitionBuilder)this; | ||
} | ||
|
||
public TDefinitionBuilder WithDescription(string description) | ||
{ | ||
this.FieldInfo.Description = description; | ||
|
||
return (TDefinitionBuilder)this; | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/GraphQLCore/Type/Complex/Builders/InputFieldDefinitionBuilder.cs
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,10 @@ | ||
namespace GraphQLCore.Type.Complex | ||
{ | ||
public class InputFieldDefinitionBuilder : FieldDefinitionBuilder<InputFieldDefinitionBuilder, GraphQLInputObjectTypeFieldInfo> | ||
{ | ||
public InputFieldDefinitionBuilder(GraphQLInputObjectTypeFieldInfo fieldInfo) | ||
: base(fieldInfo) | ||
{ | ||
} | ||
} | ||
} |
File renamed without changes.
24 changes: 10 additions & 14 deletions
24
...x/SubscriptionFieldDefinitionBuilder`1.cs → ...s/SubscriptionFieldDefinitionBuilder`1.cs
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 was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.