Skip to content

Commit

Permalink
fix(gatsby-source-shopify): update api version to fix metafield type …
Browse files Browse the repository at this point in the history
…issue (#32774)

* update api version to fix metafield type issue

* fix prettier

* alias old field name to new field name

* fix prettier

* add deprecation notice for valueType field

* fix prettier
  • Loading branch information
DanielSLew committed Aug 11, 2021
1 parent 365d00b commit 6964287
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby-source-shopify/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fetch from "node-fetch"
import { HttpError } from "./errors"

const adminUrl = (options: ShopifyPluginOptions): string =>
`https://@${options.storeUrl}/admin/api/2021-01/graphql.json`
`https://@${options.storeUrl}/admin/api/2021-07/graphql.json`

const MAX_BACKOFF_MILLISECONDS = 60000

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ export function createSchemaCustomization(
ownerType: `String!`,
updatedAt: `Date!`,
value: `String!`,
valueType: `String!`,
type: `String!`,
valueType: {
type: `String!`,
deprecationReason: `Shopify has deprecated this field`,
},
}

const metafieldInterface = schema.buildInterfaceType({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export class CollectionsQuery extends BulkQuery {
ownerType
updatedAt
value
valueType
type
valueType: type
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ export class ProductVariantsQuery extends BulkQuery {
ownerType
updatedAt
value
valueType
type
valueType: type
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ export class ProductsQuery extends BulkQuery {
ownerType
updatedAt
value
valueType
type
valueType: type
}
}
}
Expand Down

0 comments on commit 6964287

Please sign in to comment.