@pexip-engage-public/graphql
Advanced tools
# @pexip-engage-public/graphql | ||
## 1.0.11 | ||
### Patch Changes | ||
- facf84a: deps: bump all minor dependencies | ||
- 0e3d597: Web App Improvements - Google Maps deprecations + Listings Index route: | ||
- Use new Markers, old ones are deprecated | ||
- Use new google loaders in web app | ||
- Listing index fixes | ||
## 1.0.10 | ||
@@ -4,0 +14,0 @@ |
@@ -0,6 +1,7 @@ | ||
import { type DocumentNode } from "graphql"; | ||
import { GraphQLClient } from "graphql-request"; | ||
export declare function getApiClient(url: string): GraphQLClient; | ||
export declare function getGQLOperationName(input: string): string; | ||
export declare function getGQLOperationName(input: string | DocumentNode): string; | ||
export declare function createStudioSearchParam({ document, headers, variables, }: { | ||
document: string; | ||
document: string | DocumentNode; | ||
variables?: unknown; | ||
@@ -7,0 +8,0 @@ headers: Record<string, string>; |
@@ -1,2 +0,2 @@ | ||
import { Kind, parse } from "graphql"; | ||
import { Kind, parse, print } from "graphql"; | ||
import { GraphQLClient } from "graphql-request"; | ||
@@ -12,3 +12,3 @@ import lzString from "lz-string"; | ||
try { | ||
const document = parse(input); | ||
const document = typeof input === "string" ? parse(input) : input; | ||
const operationDefinition = document.definitions.find((definition) => definition.kind === Kind.OPERATION_DEFINITION); | ||
@@ -24,4 +24,5 @@ if (!operationDefinition) | ||
export function createStudioSearchParam({ document, headers, variables, }) { | ||
const stringified = typeof document === "string" ? document : print(document); | ||
return `?explorerURLState=${lzString.compressToEncodedURIComponent(JSON.stringify({ | ||
document: document.toString().trim(), | ||
document: stringified.trim(), | ||
variables: variables ? JSON.stringify(variables, null, 2) : undefined, | ||
@@ -28,0 +29,0 @@ headers: JSON.stringify(headers), |
export { createStudioSearchParam, getApiClient, getGQLOperationName } from "./get-api-client.js"; | ||
export { type FragmentOf, graphql, readFragment, type ResultOf, type VariablesOf, } from "./graphql.js"; | ||
export { GraphQLErrorCode } from "./graphql-error-codes.js"; | ||
@@ -3,0 +4,0 @@ export { handleGQLError } from "./graphql-error-handler.js"; |
export { createStudioSearchParam, getApiClient, getGQLOperationName } from "./get-api-client.js"; | ||
export { graphql, readFragment, } from "./graphql.js"; | ||
export { GraphQLErrorCode } from "./graphql-error-codes.js"; | ||
export { handleGQLError } from "./graphql-error-handler.js"; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@pexip-engage-public/graphql", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"homepage": "https://github.com/skedify/frontend-mono/tree/develop/packages/graphql#readme", | ||
@@ -36,2 +36,3 @@ "bugs": { | ||
"dependencies": { | ||
"gql.tada": "^1.2.1", | ||
"graphql": "^16.8.1", | ||
@@ -43,7 +44,8 @@ "graphql-request": "^6.1.0", | ||
"devDependencies": { | ||
"@0no-co/graphqlsp": "^1.4.1", | ||
"@graphql-codegen/cli": "^5.0.2", | ||
"@graphql-codegen/typescript": "^4.0.4", | ||
"@graphql-codegen/typescript": "^4.0.6", | ||
"@graphql-inspector/cli": "^4.0.3", | ||
"@pexip-engage/tsconfig": "0.1.1", | ||
"eslint-config-pexip-engage": "0.1.8" | ||
"eslint-config-pexip-engage": "0.1.10" | ||
}, | ||
@@ -50,0 +52,0 @@ "volta": { |
@@ -1,2 +0,2 @@ | ||
import { Kind, type OperationDefinitionNode, parse } from "graphql"; | ||
import { type DocumentNode, Kind, type OperationDefinitionNode, parse, print } from "graphql"; | ||
import { GraphQLClient } from "graphql-request"; | ||
@@ -12,5 +12,5 @@ import lzString from "lz-string"; | ||
export function getGQLOperationName(input: string) { | ||
export function getGQLOperationName(input: string | DocumentNode) { | ||
try { | ||
const document = parse(input); | ||
const document = typeof input === "string" ? parse(input) : input; | ||
@@ -34,9 +34,11 @@ const operationDefinition = document.definitions.find( | ||
}: { | ||
document: string; | ||
document: string | DocumentNode; | ||
variables?: unknown; | ||
headers: Record<string, string>; | ||
}) { | ||
const stringified = typeof document === "string" ? document : print(document); | ||
return `?explorerURLState=${lzString.compressToEncodedURIComponent( | ||
JSON.stringify({ | ||
document: document.toString().trim(), | ||
document: stringified.trim(), | ||
variables: variables ? JSON.stringify(variables, null, 2) : undefined, | ||
@@ -43,0 +45,0 @@ headers: JSON.stringify(headers), |
export { createStudioSearchParam, getApiClient, getGQLOperationName } from "./get-api-client.js"; | ||
export { | ||
type FragmentOf, | ||
graphql, | ||
readFragment, | ||
type ResultOf, | ||
type VariablesOf, | ||
} from "./graphql.js"; | ||
export { GraphQLErrorCode } from "./graphql-error-codes.js"; | ||
export { handleGQLError } from "./graphql-error-handler.js"; | ||
export type * from "./schema.js"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2418242
283.13%35
20.69%71274
603.59%5
25%6
20%2
100%