Fluent Commerce Logo
Docs
Sign In

GQL @skip @include Directives sample

Essential knowledge

Author:

Fluent Commerce

Changed on:

2 Feb 2024

Overview

Sample GQL payload to use @skip and @include directives

Key points

  • Sample query for @skip and @include

Query

1query ($includeItems: Boolean!, $skipItems: Boolean!) {
2    orders (ref:"%5"){
3        edges{
4            node{
5                id
6                ref
7                IncludeTest:items @include(if: $includeItems){
8                    edges{
9                        node{
10                            status
11                        }
12                    }
13                }
14                SkipTest:attributes @include(if: $skipItems){
15                    name
16                    value
17                }                
18            }
19        }
20    }
21}

Language: json

Name: sample query

Description:

[Warning: empty required content area]

Input Variable:

1{
2    "includeItems": false,
3    "skipItems": true
4}

Language: json

Name: input variable - sample query

Description:

[Warning: empty required content area]
Fluent Commerce

Fluent Commerce

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo