UNPKG

@shopify/graphql-client

Version:

Shopify GraphQL Client - A lightweight generic GraphQL JS client to interact with Shopify GraphQL APIs

1 lines 1.82 kB
{"version":3,"file":"constants.mjs","sources":["../../src/graphql-client/constants.ts"],"sourcesContent":["export const CLIENT = 'GraphQL Client';\nexport const MIN_RETRIES = 0;\nexport const MAX_RETRIES = 3;\n\nexport const GQL_API_ERROR =\n \"An error occurred while fetching from the API. Review 'graphQLErrors' for details.\";\nexport const UNEXPECTED_CONTENT_TYPE_ERROR =\n 'Response returned unexpected Content-Type:';\nexport const NO_DATA_OR_ERRORS_ERROR =\n 'An unknown error has occurred. The API did not return a data object or any errors in its response.';\n\nexport const CONTENT_TYPES = {\n json: 'application/json',\n multipart: 'multipart/mixed',\n};\nexport const SDK_VARIANT_HEADER = 'X-SDK-Variant';\nexport const SDK_VERSION_HEADER = 'X-SDK-Version';\n\nexport const DEFAULT_SDK_VARIANT = 'shopify-graphql-client';\n// This is value is replaced with package.json version during rollup build process\nexport const DEFAULT_CLIENT_VERSION = 'ROLLUP_REPLACE_CLIENT_VERSION';\n\nexport const RETRY_WAIT_TIME = 1000;\nexport const RETRIABLE_STATUS_CODES = [429, 503];\nexport const DEFER_OPERATION_REGEX = /@(defer)\\b/i;\nexport const NEWLINE_SEPARATOR = '\\r\\n';\nexport const BOUNDARY_HEADER_REGEX = /boundary=\"?([^=\";]+)\"?/i;\nexport const HEADER_SEPARATOR = NEWLINE_SEPARATOR + NEWLINE_SEPARATOR;\n"],"names":[],"mappings":"AAAO,MAAM,MAAM,GAAG;AACf,MAAM,WAAW,GAAG;AACpB,MAAM,WAAW,GAAG;AAEpB,MAAM,aAAa,GACxB;AACK,MAAM,6BAA6B,GACxC;AACK,MAAM,uBAAuB,GAClC;AAEK,MAAM,aAAa,GAAG;AAC3B,IAAA,IAAI,EAAE,kBAAkB;AACxB,IAAA,SAAS,EAAE,iBAAiB;;AAEvB,MAAM,kBAAkB,GAAG;AAC3B,MAAM,kBAAkB,GAAG;AAE3B,MAAM,mBAAmB,GAAG;AACnC;AACO,MAAM,sBAAsB,GAAG;AAE/B,MAAM,eAAe,GAAG;MAClB,sBAAsB,GAAG,CAAC,GAAG,EAAE,GAAG;AACxC,MAAM,qBAAqB,GAAG;AAC9B,MAAM,iBAAiB,GAAG;AAC1B,MAAM,qBAAqB,GAAG;AAC9B,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;;;;"}