Skip to content

Commit

Permalink
fix(gatsby-source-wordpress): remove graphql-query-compress for DSG s…
Browse files Browse the repository at this point in the history
…upport (#33445)
  • Loading branch information
wardpeet authored Oct 6, 2021
1 parent f837358 commit 88407f3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 34 deletions.
1 change: 0 additions & 1 deletion packages/gatsby-source-wordpress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"gatsby-source-filesystem": "^4.0.0-zz-next.2",
"glob": "^7.1.7",
"got": "^11.8.2",
"graphql-query-compress": "^1.2.4",
"lodash": "^4.17.21",
"node-fetch": "^2.6.1",
"p-queue": "^6.6.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import compress from "graphql-query-compress"
import store from "~/store"
import { findTypeName } from "~/steps/create-schema-customization/helpers"

Expand Down Expand Up @@ -64,13 +63,12 @@ export const buildNodesQueryOnFieldName = ({
queryVariables = ``,
fieldVariables = ``,
}) =>
compress(
buildQuery({
queryName: `NODE_LIST_QUERY`,
variables: `$first: Int!, $after: String, ${queryVariables}`,
fieldName,
fieldVariables: `first: $first, after: $after, ${fieldVariables}`,
builtSelectionSet: `
buildQuery({
queryName: `NODE_LIST_QUERY`,
variables: `$first: Int!, $after: String, ${queryVariables}`,
fieldName,
fieldVariables: `first: $first, after: $after, ${fieldVariables}`,
builtSelectionSet: `
nodes {
${builtSelectionSet}
}
Expand All @@ -79,9 +77,8 @@ export const buildNodesQueryOnFieldName = ({
endCursor
}
`,
builtFragments,
})
)
builtFragments,
})

const buildVariables = variables =>
variables && typeof variables === `string` ? `(${variables})` : ``
Expand Down Expand Up @@ -220,13 +217,11 @@ export const buildNodeQueryOnFieldName = ({
fieldInputArguments = `id: $id`,
queryName = `SINGLE_CONTENT_QUERY`,
}) =>
compress(
buildQuery({
queryName,
variables,
fieldName,
fieldVariables: fieldInputArguments,
builtFragments,
builtSelectionSet,
})
)
buildQuery({
queryName,
variables,
fieldName,
fieldVariables: fieldInputArguments,
builtFragments,
builtSelectionSet,
})
12 changes: 0 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12411,13 +12411,6 @@ graphql-playground-middleware-express@^1.7.18:
dependencies:
graphql-playground-html "1.6.25"

graphql-query-compress@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/graphql-query-compress/-/graphql-query-compress-1.2.4.tgz#27c6a21ef4fe0dfaa2ff9d29ca8938a876a55650"
integrity sha512-W5SMy8/2RAsC9uMOV9VTwnUkp+8N3BZz6qef6jRCIxOVrVxRBiX2btvpaKrEnPU4nchnc1bCfmMDkEtCRzJUiw==
dependencies:
tokenizr "1.5.7"

graphql-request@^1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-1.8.2.tgz#398d10ae15c585676741bde3fc01d5ca948f8fbe"
Expand Down Expand Up @@ -24925,11 +24918,6 @@ token-types@^4.1.1:
"@tokenizer/token" "^0.3.0"
ieee754 "^1.2.1"

[email protected]:
version "1.5.7"
resolved "https://registry.yarnpkg.com/tokenizr/-/tokenizr-1.5.7.tgz#80702775ac9d61899bd3c60e4c7ac36b9845bcbf"
integrity sha512-w6qS6F5PNtY30DxoRD4a7nC7zOlPM2SlpQ4zLhOmqBaB1VCZrlV82bLpc/lKNOdNmrwIwcsJLDcjEJ8f7UG6Mg==

toml@^2.3.2, toml@^2.3.6:
version "2.3.6"
resolved "https://registry.yarnpkg.com/toml/-/toml-2.3.6.tgz#25b0866483a9722474895559088b436fd11f861b"
Expand Down

0 comments on commit 88407f3

Please sign in to comment.