Repository navigation
Update from World - #9179
Merged
Merged
Update from World#9179
Conversation
Published by the World mirror. World-Commit: 92042fc5559bc61f08f17eb44358a2f894447498
Contributor
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/api/graphql.d.ts@@ -12,4 +12,11 @@ export declare function sanitizeVariables(variables: Variables): string;
*/
export declare function extractGraphQLErrorMessages(errors: any[] | undefined): string | undefined;
export declare function errorHandler(api: string): (error: unknown, requestId?: string) => unknown;
+/**
+ * Reads the `x-request-id` header of a failed GraphQL response.
+ *
+ * @param error - The error thrown by graphql-request.
+ * @returns The request ID, or undefined when the response has none.
+ */
+export declare function requestIdFromClientError(error: ClientError): string | undefined;
export declare function extractGraphQLErrors(error: unknown): NonNullable<ClientError['response']['errors']>;
\ No newline at end of file
packages/cli-kit/dist/public/node/api/admin.d.ts@@ -1,5 +1,6 @@
import { GraphQLResponseOptions, GraphQLVariables } from './graphql.js';
import { AdminSession } from '../session.js';
+import { AbortError } from '../error.js';
import { RequestModeInput } from '../http.js';
import { Variables } from 'graphql-request';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
@@ -42,6 +43,20 @@ export declare function adminRequestDoc<TResult, TVariables extends Variables>(o
* @returns - An array of supported API versions.
*/
export declare function supportedApiVersions(session: AdminSession, preferredBehaviour?: RequestModeInput): Promise<string[]>;
+/**
+ * An Admin API request that failed on the Shopify side, such as an HTTP 5xx. It is an `AbortError`,
+ * so the CLI does not report it as a bug.
+ */
+export declare class AdminServerError extends AbortError {
+ /**
+ * Creates the error with the store, the HTTP status and the request ID in its message.
+ *
+ * @param storeFqdn - The store that the request went to.
+ * @param status - The HTTP status of the response, when it is a 5xx.
+ * @param requestId - The request ID of the response, when it has one.
+ */
+ constructor(storeFqdn: string, status?: number, requestId?: string);
+}
/**
* GraphQL query to retrieve all API versions.
*
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request brings the latest changes from World, the monorepo where Shopify develops this project.
Don't push to this branch: the next update replaces it.