FROM CACHE - en_header

Bug in rendering of Admin API GraphQL documentation: Interfaces are not rendered inside an Array

Shopify Partner
10 1 6

Why did I post?

I believe there's a bug in Shopify's GraphQL Admin API documentation's frontend experience.

For all Properties that are an Array, the `variables` & 'schema' preview/example area on the right-side of the window shows the value of the property as an Object instead of an Array of Objects as documented in the rest of the documentation.


Screen Shot 2021-11-10 at 4.05.20 PM.png

What do you mean?

The documentation makes is seem that the 'variables' to pass with the GraphQL request are as if they were formatted more like the GraphQL query instead of the literal JSON that we actually must pass. It seems to oversimplify the schema so the Array context containing the objects is lost. However, I contend that data structure is very much an integral part of schema, equally as much as the Object Interfaces themselves.

The correct way to render this part of the `ProductInput` documentation:

ProductInput.variants as [ProductVariantInput!]

is like this:

  input: {
    tags: '',
    templateSuffix: '',
    title: '',
    variants: [
        barcode: '',
        compareAtPrice: '',
        fulfillmentServiceId: '',
        harmonizedSystemCode: '',
        id: '',

So, what's the plan here, Shopify?

Does this mean one of:

  • It's a bug in the rendering of the documentation and that bug will be addressed.
  • This 'variables'-pane example isn't supposed to match the data-structure defined in the documentation; it is supposed to be misleading.


Replies 0 (0)