-
Notifications
You must be signed in to change notification settings - Fork 698
Add support for onError
#6860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add support for onError
#6860
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -20,7 +20,6 @@ public final class com/apollographql/apollo/execution/ErrorPersistedDocument : c | |
| } | ||
|
|
||
| public final class com/apollographql/apollo/execution/ExecutableSchema { | ||
| public fun <init> (Lcom/apollographql/apollo/ast/Schema;Ljava/util/Map;Lcom/apollographql/apollo/execution/RootResolver;Lcom/apollographql/apollo/execution/RootResolver;Lcom/apollographql/apollo/execution/RootResolver;Lcom/apollographql/apollo/execution/Resolver;Lcom/apollographql/apollo/execution/TypeResolver;Ljava/util/List;Lcom/apollographql/apollo/execution/PersistedDocumentCache;)V | ||
| public final fun execute (Lcom/apollographql/apollo/execution/GraphQLRequest;Lcom/apollographql/apollo/api/ExecutionContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
| public static synthetic fun execute$default (Lcom/apollographql/apollo/execution/ExecutableSchema;Lcom/apollographql/apollo/execution/GraphQLRequest;Lcom/apollographql/apollo/api/ExecutionContext;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; | ||
| public final fun subscribe (Lcom/apollographql/apollo/execution/GraphQLRequest;Lcom/apollographql/apollo/api/ExecutionContext;)Lkotlinx/coroutines/flow/Flow; | ||
|
|
@@ -33,6 +32,7 @@ public final class com/apollographql/apollo/execution/ExecutableSchema$Builder { | |
| public final fun addInstrumentation (Lcom/apollographql/apollo/execution/Instrumentation;)Lcom/apollographql/apollo/execution/ExecutableSchema$Builder; | ||
| public final fun build ()Lcom/apollographql/apollo/execution/ExecutableSchema; | ||
| public final fun mutationRoot (Lcom/apollographql/apollo/execution/RootResolver;)Lcom/apollographql/apollo/execution/ExecutableSchema$Builder; | ||
| public final fun onError (Lcom/apollographql/apollo/execution/OnError;)Lcom/apollographql/apollo/execution/ExecutableSchema$Builder; | ||
| public final fun persistedDocumentCache (Lcom/apollographql/apollo/execution/PersistedDocumentCache;)Lcom/apollographql/apollo/execution/ExecutableSchema$Builder; | ||
| public final fun queryRoot (Lcom/apollographql/apollo/execution/RootResolver;)Lcom/apollographql/apollo/execution/ExecutableSchema$Builder; | ||
| public final fun resolver (Lcom/apollographql/apollo/execution/Resolver;)Lcom/apollographql/apollo/execution/ExecutableSchema$Builder; | ||
|
|
@@ -59,6 +59,7 @@ public final class com/apollographql/apollo/execution/FloatCoercing : com/apollo | |
| public final class com/apollographql/apollo/execution/GraphQLRequest { | ||
| public final fun getDocument ()Ljava/lang/String; | ||
| public final fun getExtensions ()Ljava/util/Map; | ||
| public final fun getOnError ()Lcom/apollographql/apollo/execution/OnError; | ||
| public final fun getOperationName ()Ljava/lang/String; | ||
| public final fun getVariables ()Ljava/util/Map; | ||
| } | ||
|
|
@@ -70,11 +71,14 @@ public final class com/apollographql/apollo/execution/GraphQLRequest$Builder { | |
| public final fun extensions (Ljava/util/Map;)Lcom/apollographql/apollo/execution/GraphQLRequest$Builder; | ||
| public final fun getDocument ()Ljava/lang/String; | ||
| public final fun getExtensions ()Ljava/util/Map; | ||
| public final fun getOnError ()Lcom/apollographql/apollo/execution/OnError; | ||
| public final fun getOperationName ()Ljava/lang/String; | ||
| public final fun getVariables ()Ljava/util/Map; | ||
| public final fun onError (Lcom/apollographql/apollo/execution/OnError;)Lcom/apollographql/apollo/execution/GraphQLRequest$Builder; | ||
| public final fun operationName (Ljava/lang/String;)Lcom/apollographql/apollo/execution/GraphQLRequest$Builder; | ||
| public final fun setDocument (Ljava/lang/String;)V | ||
| public final fun setExtensions (Ljava/util/Map;)V | ||
| public final fun setOnError (Lcom/apollographql/apollo/execution/OnError;)V | ||
| public final fun setOperationName (Ljava/lang/String;)V | ||
| public final fun setVariables (Ljava/util/Map;)V | ||
| public final fun variables (Ljava/util/Map;)Lcom/apollographql/apollo/execution/GraphQLRequest$Builder; | ||
|
|
@@ -85,7 +89,6 @@ public final class com/apollographql/apollo/execution/GraphQLRequestKt { | |
| public static final fun parseAsGraphQLRequest (Ljava/util/Map;)Ljava/lang/Object; | ||
| public static final fun parseAsGraphQLRequest (Lokio/BufferedSource;)Ljava/lang/Object; | ||
| public static final fun toExternalValueMap (Ljava/util/Map;)Ljava/lang/Object; | ||
| public static final fun toGraphQLRequest (Ljava/lang/String;)Lcom/apollographql/apollo/execution/GraphQLRequest; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sneaky removal before it's too late. 🥷 |
||
| } | ||
|
|
||
| public final class com/apollographql/apollo/execution/GraphQLResponse { | ||
|
|
@@ -140,6 +143,15 @@ public final class com/apollographql/apollo/execution/JsonCoercing : com/apollog | |
| public fun serialize (Ljava/lang/Object;)Ljava/lang/Object; | ||
| } | ||
|
|
||
| public final class com/apollographql/apollo/execution/OnError : java/lang/Enum { | ||
| public static final field HALT Lcom/apollographql/apollo/execution/OnError; | ||
| public static final field NULL Lcom/apollographql/apollo/execution/OnError; | ||
| public static final field PROPAGATE Lcom/apollographql/apollo/execution/OnError; | ||
| public static fun getEntries ()Lkotlin/enums/EnumEntries; | ||
| public static fun valueOf (Ljava/lang/String;)Lcom/apollographql/apollo/execution/OnError; | ||
| public static fun values ()[Lcom/apollographql/apollo/execution/OnError; | ||
| } | ||
|
|
||
| public abstract interface class com/apollographql/apollo/execution/OperationCallback { | ||
| public abstract fun onOperationCompleted (Lcom/apollographql/apollo/execution/GraphQLResponse;)Lcom/apollographql/apollo/execution/GraphQLResponse; | ||
| } | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm advocating for
nameinstead ofidentifierbecause there isnamein many other places and I don't think we need specific language for this.See graphql/graphql-spec#1208 (comment)