Skip to content

Commit fdaf623

Browse files
martinbonninBoD
andauthored
Add support for service capabilities (#6858)
* Add support for Service capabilities * remove unused code * Only add the `__service` field if the Schema has a `__Service` type * Remove unused code * Apply suggestion from @BoD Co-authored-by: Benoit 'BoD' Lubek <BoD@JRAF.org> * Apply suggestion from @BoD Co-authored-by: Benoit 'BoD' Lubek <BoD@JRAF.org> * Add @ApolloExperimental * Allow empty capabilities * Allow empty service extensions --------- Co-authored-by: Benoit 'BoD' Lubek <BoD@JRAF.org>
1 parent 387c2c3 commit fdaf623

File tree

31 files changed

+891
-513
lines changed

31 files changed

+891
-513
lines changed

libraries/apollo-ast/api/apollo-ast.api

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,20 @@ public final class com/apollographql/apollo/ast/GQLBooleanValue : com/apollograp
188188
public fun writeInternal (Lcom/apollographql/apollo/ast/SDLWriter;)V
189189
}
190190

191+
public final class com/apollographql/apollo/ast/GQLCapability : com/apollographql/apollo/ast/GQLNode {
192+
public fun <init> (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
193+
public synthetic fun <init> (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
194+
public final fun copy (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/apollographql/apollo/ast/GQLCapability;
195+
public static synthetic fun copy$default (Lcom/apollographql/apollo/ast/GQLCapability;Lcom/apollographql/apollo/ast/SourceLocation;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/apollographql/apollo/ast/GQLCapability;
196+
public fun copyWithNewChildrenInternal (Lcom/apollographql/apollo/ast/NodeContainer;)Lcom/apollographql/apollo/ast/GQLNode;
197+
public fun getChildren ()Ljava/util/List;
198+
public final fun getDescription ()Ljava/lang/String;
199+
public final fun getQualifiedName ()Ljava/lang/String;
200+
public fun getSourceLocation ()Lcom/apollographql/apollo/ast/SourceLocation;
201+
public final fun getValue ()Ljava/lang/String;
202+
public fun writeInternal (Lcom/apollographql/apollo/ast/SDLWriter;)V
203+
}
204+
191205
public abstract interface class com/apollographql/apollo/ast/GQLDefinition : com/apollographql/apollo/ast/GQLNode {
192206
}
193207

@@ -803,6 +817,33 @@ public final class com/apollographql/apollo/ast/GQLSelectionSet : com/apollograp
803817
public fun writeInternal (Lcom/apollographql/apollo/ast/SDLWriter;)V
804818
}
805819

820+
public final class com/apollographql/apollo/ast/GQLServiceDefinition : com/apollographql/apollo/ast/GQLDefinition, com/apollographql/apollo/ast/GQLDescribed, com/apollographql/apollo/ast/GQLHasDirectives {
821+
public fun <init> (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/lang/String;Ljava/util/List;Ljava/util/List;)V
822+
public synthetic fun <init> (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
823+
public final fun copy (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/lang/String;Ljava/util/List;Ljava/util/List;)Lcom/apollographql/apollo/ast/GQLServiceDefinition;
824+
public static synthetic fun copy$default (Lcom/apollographql/apollo/ast/GQLServiceDefinition;Lcom/apollographql/apollo/ast/SourceLocation;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Lcom/apollographql/apollo/ast/GQLServiceDefinition;
825+
public fun copyWithNewChildrenInternal (Lcom/apollographql/apollo/ast/NodeContainer;)Lcom/apollographql/apollo/ast/GQLNode;
826+
public final fun getCapabilities ()Ljava/util/List;
827+
public fun getChildren ()Ljava/util/List;
828+
public fun getDescription ()Ljava/lang/String;
829+
public fun getDirectives ()Ljava/util/List;
830+
public fun getSourceLocation ()Lcom/apollographql/apollo/ast/SourceLocation;
831+
public fun writeInternal (Lcom/apollographql/apollo/ast/SDLWriter;)V
832+
}
833+
834+
public final class com/apollographql/apollo/ast/GQLServiceExtension : com/apollographql/apollo/ast/GQLDefinition, com/apollographql/apollo/ast/GQLHasDirectives, com/apollographql/apollo/ast/GQLTypeSystemExtension {
835+
public fun <init> (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/util/List;Ljava/util/List;)V
836+
public synthetic fun <init> (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
837+
public final fun copy (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/util/List;Ljava/util/List;)Lcom/apollographql/apollo/ast/GQLServiceExtension;
838+
public static synthetic fun copy$default (Lcom/apollographql/apollo/ast/GQLServiceExtension;Lcom/apollographql/apollo/ast/SourceLocation;Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Lcom/apollographql/apollo/ast/GQLServiceExtension;
839+
public fun copyWithNewChildrenInternal (Lcom/apollographql/apollo/ast/NodeContainer;)Lcom/apollographql/apollo/ast/GQLNode;
840+
public final fun getCapabilities ()Ljava/util/List;
841+
public fun getChildren ()Ljava/util/List;
842+
public fun getDirectives ()Ljava/util/List;
843+
public fun getSourceLocation ()Lcom/apollographql/apollo/ast/SourceLocation;
844+
public fun writeInternal (Lcom/apollographql/apollo/ast/SDLWriter;)V
845+
}
846+
806847
public final class com/apollographql/apollo/ast/GQLStringValue : com/apollographql/apollo/ast/GQLValue {
807848
public fun <init> (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/lang/String;)V
808849
public synthetic fun <init> (Lcom/apollographql/apollo/ast/SourceLocation;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
@@ -1092,22 +1133,26 @@ public final class com/apollographql/apollo/ast/OtherValidationIssue : com/apoll
10921133

10931134
public final class com/apollographql/apollo/ast/ParserOptions {
10941135
public static final field Companion Lcom/apollographql/apollo/ast/ParserOptions$Companion;
1095-
public synthetic fun <init> (ZZZLkotlin/jvm/internal/DefaultConstructorMarker;)V
1136+
public synthetic fun <init> (ZZZZLkotlin/jvm/internal/DefaultConstructorMarker;)V
10961137
public final fun getAllowDirectivesOnDirectives ()Z
10971138
public final fun getAllowEmptyDocuments ()Z
1139+
public final fun getAllowServiceCapabilities ()Z
10981140
public final fun getWithSourceLocation ()Z
10991141
}
11001142

11011143
public final class com/apollographql/apollo/ast/ParserOptions$Builder {
11021144
public fun <init> ()V
11031145
public final fun allowDirectivesOnDirectives (Z)Lcom/apollographql/apollo/ast/ParserOptions$Builder;
11041146
public final fun allowEmptyDocuments (Z)Lcom/apollographql/apollo/ast/ParserOptions$Builder;
1147+
public final fun allowServiceCapabilities (Z)Lcom/apollographql/apollo/ast/ParserOptions$Builder;
11051148
public final fun build ()Lcom/apollographql/apollo/ast/ParserOptions;
11061149
public final fun getAllowDirectivesOnDirectives ()Z
11071150
public final fun getAllowEmptyDocuments ()Z
1151+
public final fun getAllowServiceCapabilities ()Z
11081152
public final fun getWithSourceLocation ()Z
11091153
public final fun setAllowDirectivesOnDirectives (Z)V
11101154
public final fun setAllowEmptyDocuments (Z)V
1155+
public final fun setAllowServiceCapabilities (Z)V
11111156
public final fun setWithSourceLocation (Z)V
11121157
public final fun withSourceLocation (Z)Lcom/apollographql/apollo/ast/ParserOptions$Builder;
11131158
}
@@ -1355,7 +1400,6 @@ public final class com/apollographql/apollo/ast/introspection/ApolloIntrospectio
13551400
}
13561401

13571402
public final class com/apollographql/apollo/ast/introspection/Introspection {
1358-
public static final fun normalize (Lcom/apollographql/apollo/ast/introspection/IntrospectionSchema;)Lcom/apollographql/apollo/ast/introspection/IntrospectionSchema;
13591403
public static final fun toGQLDocument (Lcom/apollographql/apollo/ast/introspection/IntrospectionSchema;)Lcom/apollographql/apollo/ast/GQLDocument;
13601404
public static final fun toIntrospectionSchema (Lcom/apollographql/apollo/ast/GQLDocument;)Lcom/apollographql/apollo/ast/introspection/ApolloIntrospectionSchema;
13611405
public static final fun toIntrospectionSchema (Ljava/io/File;)Lcom/apollographql/apollo/ast/introspection/IntrospectionSchema;

0 commit comments

Comments
 (0)