diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3f10b43193344..26c228a3bbdf3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,4 +22,6 @@ jobs: with: go-version: '^1.16.2' - name: vet - run: go vet ./... \ No newline at end of file + run: go vet ./... + - name: test + run: go test ./... \ No newline at end of file diff --git a/example/github/interfaces.md b/example/github/interfaces.md index ea1c97d30338c..8b4c7e39e67bf 100644 --- a/example/github/interfaces.md +++ b/example/github/interfaces.md @@ -1740,7 +1740,7 @@ either curated or that have been selected automatically based on popularity.

isPrivate (Boolean!) -

Identifies if the repository is private.

+

Identifies if the repository is private or internal.

isTemplate (Boolean!) @@ -1993,6 +1993,50 @@ organization or user being viewed owns.

--- +### RequirableByPullRequest + +

Represents a type that can be required by a pull request for merging.

+ +#### Implemented by + + +- [CheckRun](objects.md#checkrun) +- [StatusContext](objects.md#statuscontext) + +#### Fields + + + + + + + + + + +
NameDescription
isRequired (Boolean!) +

Whether this is required to pass before merging for a specific pull request.

+ + + + + + + + + + +
Arguments
+

pullRequestId (ID)

+

The id of the pull request this is required for

+
+

pullRequestNumber (Int)

+

The number of the pull request this is required for

+
+
+ +--- + ### Sponsorable

Entities that can be sponsored through GitHub Sponsors

diff --git a/example/github/objects.md b/example/github/objects.md index be801fa38abb2..fc6ac6a56d088 100644 --- a/example/github/objects.md +++ b/example/github/objects.md @@ -1915,6 +1915,7 @@ range’s change.

- [Node](interfaces.md#node) +- [RequirableByPullRequest](interfaces.md#requirablebypullrequest) - [UniformResourceLocatable](interfaces.md#uniformresourcelocatable) #### Fields @@ -1990,15 +1991,21 @@ range’s change.

isRequired (Boolean!) -

Whether this check run is required to pass before merging.

+

Whether this is required to pass before merging for a specific pull request.

+ + +
Arguments
-

pullRequestId (ID!)

-

The pull request this check is required for

+

pullRequestId (ID)

+

The id of the pull request this is required for

+
+

pullRequestNumber (Int)

+

The number of the pull request this is required for

@@ -2616,7 +2623,9 @@ range’s change.

associatedPullRequests (PullRequestConnection) -

The pull requests associated with a commit

+

The merged Pull Request that introduced the commit to the repository. If the +commit is not present in the default branch, additionally returns open Pull +Requests associated with the commit

@@ -8903,7 +8912,7 @@ repository can change repository visibility.

- + @@ -21169,6 +21178,14 @@ merged, or if the test merge commit is still being generated. See the + + + + + + + + - + @@ -29949,6 +29966,12 @@ amount goals. Represents a count of unique sponsors for total sponsors count goa + + + + @@ -29965,6 +29988,15 @@ amount goals. Represents a count of unique sponsors for total sponsors count goa + + + + + + + + @@ -30130,6 +30162,10 @@ blank, the sponsorships will be ordered based on relevancy to the viewer.

id (ID!) + + + + @@ -30548,7 +30584,8 @@ blank, the sponsorships will be ordered based on relevancy to the viewer.

Arguments
isPrivate (Boolean!)

Identifies if the repository is private.

Identifies if the repository is private or internal.

name (String!)viewerDidAuthor (Boolean!)

Did the viewer author this comment.

viewerLatestReview (PullRequestReview)

The latest review given from the viewer.

viewerLatestReviewRequest (ReviewRequest)

The person who has requested the viewer for review on this pull request.

viewerMergeBodyText (String!) @@ -26767,7 +26784,7 @@ organization or user being viewed owns.

isPrivate (Boolean!)

Identifies if the repository is private.

Identifies if the repository is private or internal.

isSecurityPolicyEnabled (Boolean)adminInfo (SponsorsTierAdminInfo)

SponsorsTier information only visible to users that can administer the associated Sponsors listing.

closestLesserValueTier (SponsorsTier)

Get a different tier for this tier’s maintainer that is at the same frequency +as this tier but with a lesser cost. Returns the published tier with the +monthly price closest to this tier’s without going over.

createdAt (DateTime!)

Identifies the date and time when the object was created.

id (ID!)
isCustomAmount (Boolean!)

Whether this tier was chosen at checkout time by the sponsor rather than +defined ahead of time by the maintainer who manages the Sponsors listing.

isOneTime (Boolean!)

Whether this tier is only for use with one-time sponsorships.

monthlyPriceInCents (Int!)

How much this tier costs per month in cents.

isOneTimePayment (Boolean!)

Whether this sponsorship represents a one-time payment versus a recurring sponsorship.

maintainer (User!)

The entity that is being sponsored

isRequired (Boolean!) -

Whether this status is required to pass before merging.

+

Whether this is required to pass before merging for a specific pull request.

+ + +
Arguments
-

pullRequestId (ID!)

-

The pull request this status is required for

+

pullRequestId (ID)

+

The id of the pull request this is required for

+
+

pullRequestNumber (Int)

+

The number of the pull request this is required for

diff --git a/example/shopify/README.md b/example/shopify/README.md new file mode 100644 index 0000000000000..69fcf73d34977 --- /dev/null +++ b/example/shopify/README.md @@ -0,0 +1,13 @@ +# API Reference + +View reference documentation to learn about the data types available in your GraphQL API schema. + + +- [Query](queries.md) +- [Mutations](mutations.md) +- [Objects](objects.md) +- [Interfaces](interfaces.md) +- [Enums](enums.md) +- [Unions](unions.md) +- [Input objects](input_objects.md) +- [Scalars](scalars.md) \ No newline at end of file diff --git a/example/shopify/enums.md b/example/shopify/enums.md new file mode 100644 index 0000000000000..7924a261da93c --- /dev/null +++ b/example/shopify/enums.md @@ -0,0 +1,2836 @@ +# Enums + +### About enums + +[Enums](https://graphql.github.io/graphql-spec/June2018/#sec-Enums) represent possible sets of values for a field. + +### ArticleSortKeys + +

The set of valid sort keys for the Article query.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
AUTHOR

Sort by the author value.

BLOG_TITLE

Sort by the blog_title value.

ID

Sort by the id value.

PUBLISHED_AT

Sort by the published_at value.

RELEVANCE

During a search (i.e. when the query parameter has been specified on the connection) this sorts the +results by relevance to the search term(s). When no search query is specified, this sort key is not +deterministic and should not be used.

TITLE

Sort by the title value.

UPDATED_AT

Sort by the updated_at value.

+ +--- + +### BlogSortKeys + +

The set of valid sort keys for the Blog query.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
HANDLE

Sort by the handle value.

ID

Sort by the id value.

RELEVANCE

During a search (i.e. when the query parameter has been specified on the connection) this sorts the +results by relevance to the search term(s). When no search query is specified, this sort key is not +deterministic and should not be used.

TITLE

Sort by the title value.

+ +--- + +### CardBrand + +

Card brand, such as Visa or Mastercard, which can be used for payments.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
AMERICAN_EXPRESS

American Express.

DINERS_CLUB

Diners Club.

DISCOVER

Discover.

JCB

JCB.

MASTERCARD

Mastercard.

VISA

Visa.

+ +--- + +### CheckoutErrorCode + +

Possible error codes that could be returned by CheckoutUserError.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
ALREADY_COMPLETED

Checkout is already completed.

BAD_DOMAIN

Input email contains an invalid domain name.

BLANK

Input value is blank.

CART_DOES_NOT_MEET_DISCOUNT_REQUIREMENTS_NOTICE

Cart does not meet discount requirements notice.

CUSTOMER_ALREADY_USED_ONCE_PER_CUSTOMER_DISCOUNT_NOTICE

Customer already used once per customer discount notice.

DISCOUNT_ALREADY_APPLIED

Discount already applied.

DISCOUNT_DISABLED

Discount disabled.

DISCOUNT_EXPIRED

Discount expired.

DISCOUNT_LIMIT_REACHED

Discount limit reached.

DISCOUNT_NOT_FOUND

Discount not found.

EMPTY

Checkout is already completed.

GIFT_CARD_ALREADY_APPLIED

Gift card has already been applied.

GIFT_CARD_CODE_INVALID

Gift card code is invalid.

GIFT_CARD_CURRENCY_MISMATCH

Gift card currency does not match checkout currency.

GIFT_CARD_DEPLETED

Gift card has no funds left.

GIFT_CARD_DISABLED

Gift card is disabled.

GIFT_CARD_EXPIRED

Gift card is expired.

GIFT_CARD_NOT_FOUND

Gift card was not found.

GIFT_CARD_UNUSABLE

Gift card cannot be applied to a checkout that contains a gift card.

GREATER_THAN_OR_EQUAL_TO

Input value should be greater than or equal to minimum allowed value.

INVALID

Input value is invalid.

INVALID_FOR_COUNTRY

Input Zip is invalid for country provided.

INVALID_FOR_COUNTRY_AND_PROVINCE

Input Zip is invalid for country and province provided.

INVALID_PROVINCE_IN_COUNTRY

Invalid province in country.

INVALID_REGION_IN_COUNTRY

Invalid region in country.

INVALID_STATE_IN_COUNTRY

Invalid state in country.

LESS_THAN

Input value should be less than maximum allowed value.

LESS_THAN_OR_EQUAL_TO

Input value should be less or equal to maximum allowed value.

LINE_ITEM_NOT_FOUND

Line item was not found in checkout.

LOCKED

Checkout is locked.

MISSING_PAYMENT_INPUT

Missing payment input.

NOT_ENOUGH_IN_STOCK

Not enough in stock.

NOT_SUPPORTED

Input value is not supported.

PRESENT

Input value is not present.

SHIPPING_RATE_EXPIRED

Shipping rate expired.

TOO_LONG

Input value is too long.

TOTAL_PRICE_MISMATCH

The amount of the payment does not match the value to be paid.

UNABLE_TO_APPLY

Unable to apply discount.

+ +--- + +### CollectionSortKeys + +

The set of valid sort keys for the Collection query.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
ID

Sort by the id value.

RELEVANCE

During a search (i.e. when the query parameter has been specified on the connection) this sorts the +results by relevance to the search term(s). When no search query is specified, this sort key is not +deterministic and should not be used.

TITLE

Sort by the title value.

UPDATED_AT

Sort by the updated_at value.

+ +--- + +### CountryCode + +

ISO 3166-1 alpha-2 country codes with some differences.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
AC

Ascension Island.

AD

Andorra.

AE

United Arab Emirates.

AF

Afghanistan.

AG

Antigua & Barbuda.

AI

Anguilla.

AL

Albania.

AM

Armenia.

AN

Netherlands Antilles.

AO

Angola.

AR

Argentina.

AT

Austria.

AU

Australia.

AW

Aruba.

AX

Åland Islands.

AZ

Azerbaijan.

BA

Bosnia & Herzegovina.

BB

Barbados.

BD

Bangladesh.

BE

Belgium.

BF

Burkina Faso.

BG

Bulgaria.

BH

Bahrain.

BI

Burundi.

BJ

Benin.

BL

St. Barthélemy.

BM

Bermuda.

BN

Brunei.

BO

Bolivia.

BQ

Caribbean Netherlands.

BR

Brazil.

BS

Bahamas.

BT

Bhutan.

BV

Bouvet Island.

BW

Botswana.

BY

Belarus.

BZ

Belize.

CA

Canada.

CC

Cocos (Keeling) Islands.

CD

Congo - Kinshasa.

CF

Central African Republic.

CG

Congo - Brazzaville.

CH

Switzerland.

CI

Côte d’Ivoire.

CK

Cook Islands.

CL

Chile.

CM

Cameroon.

CN

China.

CO

Colombia.

CR

Costa Rica.

CU

Cuba.

CV

Cape Verde.

CW

Curaçao.

CX

Christmas Island.

CY

Cyprus.

CZ

Czechia.

DE

Germany.

DJ

Djibouti.

DK

Denmark.

DM

Dominica.

DO

Dominican Republic.

DZ

Algeria.

EC

Ecuador.

EE

Estonia.

EG

Egypt.

EH

Western Sahara.

ER

Eritrea.

ES

Spain.

ET

Ethiopia.

FI

Finland.

FJ

Fiji.

FK

Falkland Islands.

FO

Faroe Islands.

FR

France.

GA

Gabon.

GB

United Kingdom.

GD

Grenada.

GE

Georgia.

GF

French Guiana.

GG

Guernsey.

GH

Ghana.

GI

Gibraltar.

GL

Greenland.

GM

Gambia.

GN

Guinea.

GP

Guadeloupe.

GQ

Equatorial Guinea.

GR

Greece.

GS

South Georgia & South Sandwich Islands.

GT

Guatemala.

GW

Guinea-Bissau.

GY

Guyana.

HK

Hong Kong SAR.

HM

Heard & McDonald Islands.

HN

Honduras.

HR

Croatia.

HT

Haiti.

HU

Hungary.

ID

Indonesia.

IE

Ireland.

IL

Israel.

IM

Isle of Man.

IN

India.

IO

British Indian Ocean Territory.

IQ

Iraq.

IR

Iran.

IS

Iceland.

IT

Italy.

JE

Jersey.

JM

Jamaica.

JO

Jordan.

JP

Japan.

KE

Kenya.

KG

Kyrgyzstan.

KH

Cambodia.

KI

Kiribati.

KM

Comoros.

KN

St. Kitts & Nevis.

KP

North Korea.

KR

South Korea.

KW

Kuwait.

KY

Cayman Islands.

KZ

Kazakhstan.

LA

Laos.

LB

Lebanon.

LC

St. Lucia.

LI

Liechtenstein.

LK

Sri Lanka.

LR

Liberia.

LS

Lesotho.

LT

Lithuania.

LU

Luxembourg.

LV

Latvia.

LY

Libya.

MA

Morocco.

MC

Monaco.

MD

Moldova.

ME

Montenegro.

MF

St. Martin.

MG

Madagascar.

MK

North Macedonia.

ML

Mali.

MM

Myanmar (Burma).

MN

Mongolia.

MO

Macao SAR.

MQ

Martinique.

MR

Mauritania.

MS

Montserrat.

MT

Malta.

MU

Mauritius.

MV

Maldives.

MW

Malawi.

MX

Mexico.

MY

Malaysia.

MZ

Mozambique.

NA

Namibia.

NC

New Caledonia.

NE

Niger.

NF

Norfolk Island.

NG

Nigeria.

NI

Nicaragua.

NL

Netherlands.

NO

Norway.

NP

Nepal.

NR

Nauru.

NU

Niue.

NZ

New Zealand.

OM

Oman.

PA

Panama.

PE

Peru.

PF

French Polynesia.

PG

Papua New Guinea.

PH

Philippines.

PK

Pakistan.

PL

Poland.

PM

St. Pierre & Miquelon.

PN

Pitcairn Islands.

PS

Palestinian Territories.

PT

Portugal.

PY

Paraguay.

QA

Qatar.

RE

Réunion.

RO

Romania.

RS

Serbia.

RU

Russia.

RW

Rwanda.

SA

Saudi Arabia.

SB

Solomon Islands.

SC

Seychelles.

SD

Sudan.

SE

Sweden.

SG

Singapore.

SH

St. Helena.

SI

Slovenia.

SJ

Svalbard & Jan Mayen.

SK

Slovakia.

SL

Sierra Leone.

SM

San Marino.

SN

Senegal.

SO

Somalia.

SR

Suriname.

SS

South Sudan.

ST

São Tomé & Príncipe.

SV

El Salvador.

SX

Sint Maarten.

SY

Syria.

SZ

Eswatini.

TA

Tristan da Cunha.

TC

Turks & Caicos Islands.

TD

Chad.

TF

French Southern Territories.

TG

Togo.

TH

Thailand.

TJ

Tajikistan.

TK

Tokelau.

TL

Timor-Leste.

TM

Turkmenistan.

TN

Tunisia.

TO

Tonga.

TR

Turkey.

TT

Trinidad & Tobago.

TV

Tuvalu.

TW

Taiwan.

TZ

Tanzania.

UA

Ukraine.

UG

Uganda.

UM

U.S. Outlying Islands.

US

United States.

UY

Uruguay.

UZ

Uzbekistan.

VA

Vatican City.

VC

St. Vincent & Grenadines.

VE

Venezuela.

VG

British Virgin Islands.

VN

Vietnam.

VU

Vanuatu.

WF

Wallis & Futuna.

WS

Samoa.

XK

Kosovo.

YE

Yemen.

YT

Mayotte.

ZA

South Africa.

ZM

Zambia.

ZW

Zimbabwe.

ZZ

Unknown Region.

+ +--- + +### CropRegion + +

The part of the image that should remain after cropping.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
BOTTOM

Keep the bottom of the image.

CENTER

Keep the center of the image.

LEFT

Keep the left of the image.

RIGHT

Keep the right of the image.

TOP

Keep the top of the image.

+ +--- + +### CurrencyCode + +

Currency codes.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
AED

United Arab Emirates Dirham (AED).

AFN

Afghan Afghani (AFN).

ALL

Albanian Lek (ALL).

AMD

Armenian Dram (AMD).

ANG

Netherlands Antillean Guilder.

AOA

Angolan Kwanza (AOA).

ARS

Argentine Pesos (ARS).

AUD

Australian Dollars (AUD).

AWG

Aruban Florin (AWG).

AZN

Azerbaijani Manat (AZN).

BAM

Bosnia and Herzegovina Convertible Mark (BAM).

BBD

Barbadian Dollar (BBD).

BDT

Bangladesh Taka (BDT).

BGN

Bulgarian Lev (BGN).

BHD

Bahraini Dinar (BHD).

BIF

Burundian Franc (BIF).

BMD

Bermudian Dollar (BMD).

BND

Brunei Dollar (BND).

BOB

Bolivian Boliviano (BOB).

BRL

Brazilian Real (BRL).

BSD

Bahamian Dollar (BSD).

BTN

Bhutanese Ngultrum (BTN).

BWP

Botswana Pula (BWP).

BYN

Belarusian Ruble (BYN).

BYR

Belarusian Ruble (BYR).

BZD

Belize Dollar (BZD).

CAD

Canadian Dollars (CAD).

CDF

Congolese franc (CDF).

CHF

Swiss Francs (CHF).

CLP

Chilean Peso (CLP).

CNY

Chinese Yuan Renminbi (CNY).

COP

Colombian Peso (COP).

CRC

Costa Rican Colones (CRC).

CVE

Cape Verdean escudo (CVE).

CZK

Czech Koruny (CZK).

DJF

Djiboutian Franc (DJF).

DKK

Danish Kroner (DKK).

DOP

Dominican Peso (DOP).

DZD

Algerian Dinar (DZD).

EGP

Egyptian Pound (EGP).

ERN

Eritrean Nakfa (ERN).

ETB

Ethiopian Birr (ETB).

EUR

Euro (EUR).

FJD

Fijian Dollars (FJD).

FKP

Falkland Islands Pounds (FKP).

GBP

United Kingdom Pounds (GBP).

GEL

Georgian Lari (GEL).

GHS

Ghanaian Cedi (GHS).

GIP

Gibraltar Pounds (GIP).

GMD

Gambian Dalasi (GMD).

GNF

Guinean Franc (GNF).

GTQ

Guatemalan Quetzal (GTQ).

GYD

Guyanese Dollar (GYD).

HKD

Hong Kong Dollars (HKD).

HNL

Honduran Lempira (HNL).

HRK

Croatian Kuna (HRK).

HTG

Haitian Gourde (HTG).

HUF

Hungarian Forint (HUF).

IDR

Indonesian Rupiah (IDR).

ILS

Israeli New Shekel (NIS).

INR

Indian Rupees (INR).

IQD

Iraqi Dinar (IQD).

IRR

Iranian Rial (IRR).

ISK

Icelandic Kronur (ISK).

JEP

Jersey Pound.

JMD

Jamaican Dollars (JMD).

JOD

Jordanian Dinar (JOD).

JPY

Japanese Yen (JPY).

KES

Kenyan Shilling (KES).

KGS

Kyrgyzstani Som (KGS).

KHR

Cambodian Riel.

KID

Kiribati Dollar (KID).

KMF

Comorian Franc (KMF).

KRW

South Korean Won (KRW).

KWD

Kuwaiti Dinar (KWD).

KYD

Cayman Dollars (KYD).

KZT

Kazakhstani Tenge (KZT).

LAK

Laotian Kip (LAK).

LBP

Lebanese Pounds (LBP).

LKR

Sri Lankan Rupees (LKR).

LRD

Liberian Dollar (LRD).

LSL

Lesotho Loti (LSL).

LTL

Lithuanian Litai (LTL).

LVL

Latvian Lati (LVL).

LYD

Libyan Dinar (LYD).

MAD

Moroccan Dirham.

MDL

Moldovan Leu (MDL).

MGA

Malagasy Ariary (MGA).

MKD

Macedonia Denar (MKD).

MMK

Burmese Kyat (MMK).

MNT

Mongolian Tugrik.

MOP

Macanese Pataca (MOP).

MRU

Mauritanian Ouguiya (MRU).

MUR

Mauritian Rupee (MUR).

MVR

Maldivian Rufiyaa (MVR).

MWK

Malawian Kwacha (MWK).

MXN

Mexican Pesos (MXN).

MYR

Malaysian Ringgits (MYR).

MZN

Mozambican Metical.

NAD

Namibian Dollar.

NGN

Nigerian Naira (NGN).

NIO

Nicaraguan Córdoba (NIO).

NOK

Norwegian Kroner (NOK).

NPR

Nepalese Rupee (NPR).

NZD

New Zealand Dollars (NZD).

OMR

Omani Rial (OMR).

PAB

Panamian Balboa (PAB).

PEN

Peruvian Nuevo Sol (PEN).

PGK

Papua New Guinean Kina (PGK).

PHP

Philippine Peso (PHP).

PKR

Pakistani Rupee (PKR).

PLN

Polish Zlotych (PLN).

PYG

Paraguayan Guarani (PYG).

QAR

Qatari Rial (QAR).

RON

Romanian Lei (RON).

RSD

Serbian dinar (RSD).

RUB

Russian Rubles (RUB).

RWF

Rwandan Franc (RWF).

SAR

Saudi Riyal (SAR).

SBD

Solomon Islands Dollar (SBD).

SCR

Seychellois Rupee (SCR).

SDG

Sudanese Pound (SDG).

SEK

Swedish Kronor (SEK).

SGD

Singapore Dollars (SGD).

SHP

Saint Helena Pounds (SHP).

SLL

Sierra Leonean Leone (SLL).

SOS

Somali Shilling (SOS).

SRD

Surinamese Dollar (SRD).

SSP

South Sudanese Pound (SSP).

STD

Sao Tome And Principe Dobra (STD).

SYP

Syrian Pound (SYP).

SZL

Swazi Lilangeni (SZL).

THB

Thai baht (THB).

TJS

Tajikistani Somoni (TJS).

TMT

Turkmenistani Manat (TMT).

TND

Tunisian Dinar (TND).

TOP

Tongan Pa’anga (TOP).

TRY

Turkish Lira (TRY).

TTD

Trinidad and Tobago Dollars (TTD).

TWD

Taiwan Dollars (TWD).

TZS

Tanzanian Shilling (TZS).

UAH

Ukrainian Hryvnia (UAH).

UGX

Ugandan Shilling (UGX).

USD

United States Dollars (USD).

UYU

Uruguayan Pesos (UYU).

UZS

Uzbekistan som (UZS).

VEF

Venezuelan Bolivares (VEF).

VES

Venezuelan Bolivares (VES).

VND

Vietnamese đồng (VND).

VUV

Vanuatu Vatu (VUV).

WST

Samoan Tala (WST).

XAF

Central African CFA Franc (XAF).

XCD

East Caribbean Dollar (XCD).

XOF

West African CFA franc (XOF).

XPF

CFP Franc (XPF).

YER

Yemeni Rial (YER).

ZAR

South African Rand (ZAR).

ZMW

Zambian Kwacha (ZMW).

+ +--- + +### CustomerErrorCode + +

Possible error codes that could be returned by CustomerUserError.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
ALREADY_ENABLED

Customer already enabled.

BAD_DOMAIN

Input email contains an invalid domain name.

BLANK

Input value is blank.

CONTAINS_HTML_TAGS

Input contains HTML tags.

CONTAINS_URL

Input contains URL.

CUSTOMER_DISABLED

Customer is disabled.

INVALID

Input value is invalid.

INVALID_MULTIPASS_REQUEST

Multipass token is not valid.

NOT_FOUND

Address does not exist.

PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE

Input password starts or ends with whitespace.

TAKEN

Input value is already taken.

TOKEN_INVALID

Invalid activation token.

TOO_LONG

Input value is too long.

TOO_SHORT

Input value is too short.

UNIDENTIFIED_CUSTOMER

Unidentified customer.

+ +--- + +### DigitalWallet + +

Digital wallet, such as Apple Pay, which can be used for accelerated checkouts.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
ANDROID_PAY

Android Pay.

APPLE_PAY

Apple Pay.

GOOGLE_PAY

Google Pay.

SHOPIFY_PAY

Shopify Pay.

+ +--- + +### DiscountApplicationAllocationMethod + +

The method by which the discount’s value is allocated onto its entitled lines.

+ + + + + + + + + + + + + + + + + + +
ValueDescription
ACROSS

The value is spread across all entitled lines.

EACH

The value is applied onto every entitled line.

ONE

The value is specifically applied onto a particular line.

+ +--- + +### DiscountApplicationTargetSelection + +

Which lines on the order that the discount is allocated over, of the type +defined by the Discount Application’s target_type.

+ + + + + + + + + + + + + + + + + + +
ValueDescription
ALL

The discount is allocated onto all the lines.

ENTITLED

The discount is allocated onto only the lines it is entitled for.

EXPLICIT

The discount is allocated onto explicitly chosen lines.

+ +--- + +### DiscountApplicationTargetType + +

The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards.

+ + + + + + + + + + + + + + +
ValueDescription
LINE_ITEM

The discount applies onto line items.

SHIPPING_LINE

The discount applies onto shipping lines.

+ +--- + +### ImageContentType + +

List of supported image content types.

+ + + + + + + + + + + + + + + + + + +
ValueDescription
JPG

A JPG image.

PNG

A PNG image.

WEBP

A WEBP image.

+ +--- + +### MediaContentType + +

The possible content types for a media object.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
EXTERNAL_VIDEO

An externally hosted video.

IMAGE

A Shopify hosted image.

MODEL_3D

A 3d model.

VIDEO

A Shopify hosted video.

+ +--- + +### MediaHost + +

Host for a Media Resource.

+ + + + + + + + + + + + + + +
ValueDescription
VIMEO

Host for Vimeo embedded videos.

YOUTUBE

Host for YouTube embedded videos.

+ +--- + +### MetafieldValueType + +

Metafield value types.

+ + + + + + + + + + + + + + + + + + +
ValueDescription
INTEGER

An integer metafield.

JSON_STRING

A json string metafield.

STRING

A string metafield.

+ +--- + +### OrderCancelReason + +

Represents the reason for the order’s cancellation.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
CUSTOMER

The customer wanted to cancel the order.

DECLINED

Payment was declined.

FRAUD

The order was fraudulent.

INVENTORY

There was insufficient inventory.

OTHER

The order was canceled for an unlisted reason.

+ +--- + +### OrderFinancialStatus + +

Represents the order’s current financial status.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
AUTHORIZED

Displayed as Authorized.

PAID

Displayed as Paid.

PARTIALLY_PAID

Displayed as Partially paid.

PARTIALLY_REFUNDED

Displayed as Partially refunded.

PENDING

Displayed as Pending.

REFUNDED

Displayed as Refunded.

VOIDED

Displayed as Voided.

+ +--- + +### OrderFulfillmentStatus + +

Represents the order’s current fulfillment status.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
FULFILLED

Displayed as Fulfilled.

IN_PROGRESS

Displayed as In progress.

OPEN

Displayed as Open.

PARTIALLY_FULFILLED

Displayed as Partially fulfilled.

PENDING_FULFILLMENT

Displayed as Pending fulfillment.

RESTOCKED

Displayed as Restocked.

SCHEDULED

Displayed as Scheduled.

UNFULFILLED

Displayed as Unfulfilled.

+ +--- + +### OrderSortKeys + +

The set of valid sort keys for the Order query.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
ID

Sort by the id value.

PROCESSED_AT

Sort by the processed_at value.

RELEVANCE

During a search (i.e. when the query parameter has been specified on the connection) this sorts the +results by relevance to the search term(s). When no search query is specified, this sort key is not +deterministic and should not be used.

TOTAL_PRICE

Sort by the total_price value.

+ +--- + +### PageSortKeys + +

The set of valid sort keys for the Page query.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
ID

Sort by the id value.

RELEVANCE

During a search (i.e. when the query parameter has been specified on the connection) this sorts the +results by relevance to the search term(s). When no search query is specified, this sort key is not +deterministic and should not be used.

TITLE

Sort by the title value.

UPDATED_AT

Sort by the updated_at value.

+ +--- + +### PaymentTokenType + +

The valid values for the types of payment token.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
APPLE_PAY

Apple Pay token type.

GOOGLE_PAY

Google Pay token type.

SHOPIFY_PAY

Shopify Pay token type.

VAULT

Vault payment token type.

+ +--- + +### ProductCollectionSortKeys + +

The set of valid sort keys for the ProductCollection query.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
BEST_SELLING

Sort by the best-selling value.

COLLECTION_DEFAULT

Sort by the collection-default value.

CREATED

Sort by the created value.

ID

Sort by the id value.

MANUAL

Sort by the manual value.

PRICE

Sort by the price value.

RELEVANCE

During a search (i.e. when the query parameter has been specified on the connection) this sorts the +results by relevance to the search term(s). When no search query is specified, this sort key is not +deterministic and should not be used.

TITLE

Sort by the title value.

+ +--- + +### ProductImageSortKeys + +

The set of valid sort keys for the ProductImage query.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
CREATED_AT

Sort by the created_at value.

ID

Sort by the id value.

POSITION

Sort by the position value.

RELEVANCE

During a search (i.e. when the query parameter has been specified on the connection) this sorts the +results by relevance to the search term(s). When no search query is specified, this sort key is not +deterministic and should not be used.

+ +--- + +### ProductMediaSortKeys + +

The set of valid sort keys for the ProductMedia query.

+ + + + + + + + + + + + + + + + + + +
ValueDescription
ID

Sort by the id value.

POSITION

Sort by the position value.

RELEVANCE

During a search (i.e. when the query parameter has been specified on the connection) this sorts the +results by relevance to the search term(s). When no search query is specified, this sort key is not +deterministic and should not be used.

+ +--- + +### ProductSortKeys + +

The set of valid sort keys for the Product query.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
BEST_SELLING

Sort by the best_selling value.

CREATED_AT

Sort by the created_at value.

ID

Sort by the id value.

PRICE

Sort by the price value.

PRODUCT_TYPE

Sort by the product_type value.

RELEVANCE

During a search (i.e. when the query parameter has been specified on the connection) this sorts the +results by relevance to the search term(s). When no search query is specified, this sort key is not +deterministic and should not be used.

TITLE

Sort by the title value.

UPDATED_AT

Sort by the updated_at value.

VENDOR

Sort by the vendor value.

+ +--- + +### ProductVariantSortKeys + +

The set of valid sort keys for the ProductVariant query.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
ID

Sort by the id value.

POSITION

Sort by the position value.

RELEVANCE

During a search (i.e. when the query parameter has been specified on the connection) this sorts the +results by relevance to the search term(s). When no search query is specified, this sort key is not +deterministic and should not be used.

SKU

Sort by the sku value.

TITLE

Sort by the title value.

+ +--- + +### TransactionKind + +

The different kinds of order transactions.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
AUTHORIZATION

An amount reserved against the cardholder’s funding source. +Money does not change hands until the authorization is captured.

CAPTURE

A transfer of the money that was reserved during the authorization stage.

CHANGE

Money returned to the customer when they have paid too much.

EMV_AUTHORIZATION

An authorization for a payment taken with an EMV credit card reader.

SALE

An authorization and capture performed together in a single step.

+ +--- + +### TransactionStatus + +

Transaction statuses describe the status of a transaction.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
ERROR

There was an error while processing the transaction.

FAILURE

The transaction failed.

PENDING

The transaction is pending.

SUCCESS

The transaction succeeded.

+ +--- + +### UnitPriceMeasurementMeasuredType + +

The accepted types of unit of measurement.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
AREA

Unit of measurements representing areas.

LENGTH

Unit of measurements representing lengths.

VOLUME

Unit of measurements representing volumes.

WEIGHT

Unit of measurements representing weights.

+ +--- + +### UnitPriceMeasurementMeasuredUnit + +

The valid units of measurement for a unit price measurement.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
CL

100 centiliters equals 1 liter.

CM

100 centimeters equals 1 meter.

G

Metric system unit of weight.

KG

1 kilogram equals 1000 grams.

L

Metric system unit of volume.

M

Metric system unit of length.

M2

Metric system unit of area.

M3

1 cubic meter equals 1000 liters.

MG

1000 milligrams equals 1 gram.

ML

1000 milliliters equals 1 liter.

MM

1000 millimeters equals 1 meter.

+ +--- + +### WeightUnit + +

Units of measurement for weight.

+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
GRAMS

Metric system unit of mass.

KILOGRAMS

1 kilogram equals 1000 grams.

OUNCES

Imperial system unit of mass.

POUNDS

1 pound equals 16 ounces.

+ +--- \ No newline at end of file diff --git a/example/shopify/input_objects.md b/example/shopify/input_objects.md new file mode 100644 index 0000000000000..24dfacdc1c994 --- /dev/null +++ b/example/shopify/input_objects.md @@ -0,0 +1,685 @@ +# Input objects + +### About input objects + +[Input objects](https://graphql.github.io/graphql-spec/June2018/#sec-Input-Objects) can be described as "composable objects" because they include a set of input fields that define the object. + +### AttributeInput + +

Specifies the input fields required for an attribute.

+ + +#### Input fields + + + + + + + + + + + + + + +
NameDescription
key (String!)

Key or name of the attribute.

value (String!)

Value of the attribute.

+ +--- + +### CheckoutAttributesUpdateInput + +

Specifies the fields required to update a checkout’s attributes.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + +
NameDescription
allowPartialAddresses (Boolean)

Allows setting partial addresses on a Checkout, skipping the full validation of attributes. +The required attributes are city, province, and country. +Full validation of the addresses is still done at complete time.

customAttributes ([AttributeInput!])

A list of extra information that is added to the checkout.

note (String)

The text of an optional note that a shop owner can attach to the checkout.

+ +--- + +### CheckoutAttributesUpdateV2Input + +

Specifies the fields required to update a checkout’s attributes.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + +
NameDescription
allowPartialAddresses (Boolean)

Allows setting partial addresses on a Checkout, skipping the full validation of attributes. +The required attributes are city, province, and country. +Full validation of the addresses is still done at complete time.

customAttributes ([AttributeInput!])

A list of extra information that is added to the checkout.

note (String)

The text of an optional note that a shop owner can attach to the checkout.

+ +--- + +### CheckoutCreateInput + +

Specifies the fields required to create a checkout.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
allowPartialAddresses (Boolean)

Allows setting partial addresses on a Checkout, skipping the full validation of attributes. +The required attributes are city, province, and country. +Full validation of addresses is still done at complete time.

customAttributes ([AttributeInput!])

A list of extra information that is added to the checkout.

email (String)

The email with which the customer wants to checkout.

lineItems ([CheckoutLineItemInput!])

A list of line item objects, each one containing information about an item in the checkout.

note (String)

The text of an optional note that a shop owner can attach to the checkout.

presentmentCurrencyCode (CurrencyCode)

The three-letter currency code of one of the shop’s enabled presentment currencies. +Including this field creates a checkout in the specified currency. By default, new +checkouts are created in the shop’s primary currency.

shippingAddress (MailingAddressInput)

The shipping address to where the line items will be shipped.

+ +--- + +### CheckoutLineItemInput + +

Specifies the input fields to create a line item on a checkout.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + +
NameDescription
customAttributes ([AttributeInput!])

Extra information in the form of an array of Key-Value pairs about the line item.

quantity (Int!)

The quantity of the line item.

variantId (ID!)

The identifier of the product variant for the line item.

+ +--- + +### CheckoutLineItemUpdateInput + +

Specifies the input fields to update a line item on the checkout.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
customAttributes ([AttributeInput!])

Extra information in the form of an array of Key-Value pairs about the line item.

id (ID)

The identifier of the line item.

quantity (Int)

The quantity of the line item.

variantId (ID)

The variant identifier of the line item.

+ +--- + +### CreditCardPaymentInput + +

Specifies the fields required to complete a checkout with +a Shopify vaulted credit card payment.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
amount (Money!)

The amount of the payment.

billingAddress (MailingAddressInput!)

The billing address for the payment.

idempotencyKey (String!)

A unique client generated key used to avoid duplicate charges. When a +duplicate payment is found, the original is returned instead of creating a new +one. For more information, refer to Idempotent +requests.

test (Boolean)

Executes the payment in test mode if possible. Defaults to false.

vaultId (String!)

The ID returned by Shopify’s Card Vault.

+ +--- + +### CreditCardPaymentInputV2 + +

Specifies the fields required to complete a checkout with +a Shopify vaulted credit card payment.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
billingAddress (MailingAddressInput!)

The billing address for the payment.

idempotencyKey (String!)

A unique client generated key used to avoid duplicate charges. When a +duplicate payment is found, the original is returned instead of creating a new +one. For more information, refer to Idempotent +requests.

paymentAmount (MoneyInput!)

The amount and currency of the payment.

test (Boolean)

Executes the payment in test mode if possible. Defaults to false.

vaultId (String!)

The ID returned by Shopify’s Card Vault.

+ +--- + +### CustomerAccessTokenCreateInput + +

Specifies the input fields required to create a customer access token.

+ + +#### Input fields + + + + + + + + + + + + + + +
NameDescription
email (String!)

The email associated to the customer.

password (String!)

The login password to be used by the customer.

+ +--- + +### CustomerActivateInput + +

Specifies the input fields required to activate a customer.

+ + +#### Input fields + + + + + + + + + + + + + + +
NameDescription
activationToken (String!)

The activation token required to activate the customer.

password (String!)

New password that will be set during activation.

+ +--- + +### CustomerCreateInput + +

Specifies the fields required to create a new customer.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
acceptsMarketing (Boolean)

Indicates whether the customer has consented to be sent marketing material via email.

email (String!)

The customer’s email.

firstName (String)

The customer’s first name.

lastName (String)

The customer’s last name.

password (String!)

The login password used by the customer.

phone (String)

A unique phone number for the customer.

+ +

Formatted using E.164 standard. For example, +16135551111.

+ +--- + +### CustomerResetInput + +

Specifies the fields required to reset a customer’s password.

+ + +#### Input fields + + + + + + + + + + + + + + +
NameDescription
password (String!)

New password that will be set as part of the reset password process.

resetToken (String!)

The reset token required to reset the customer’s password.

+ +--- + +### CustomerUpdateInput + +

Specifies the fields required to update the Customer information.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
acceptsMarketing (Boolean)

Indicates whether the customer has consented to be sent marketing material via email.

email (String)

The customer’s email.

firstName (String)

The customer’s first name.

lastName (String)

The customer’s last name.

password (String)

The login password used by the customer.

phone (String)

A unique phone number for the customer.

+ +

Formatted using E.164 standard. For example, +16135551111. To remove the phone number, specify null.

+ +--- + +### MailingAddressInput + +

Specifies the fields accepted to create or update a mailing address.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
address1 (String)

The first line of the address. Typically the street address or PO Box number.

address2 (String)

The second line of the address. Typically the number of the apartment, suite, or unit.

city (String)

The name of the city, district, village, or town.

company (String)

The name of the customer’s company or organization.

country (String)

The name of the country.

firstName (String)

The first name of the customer.

lastName (String)

The last name of the customer.

phone (String)

A unique phone number for the customer.

+ +

Formatted using E.164 standard. For example, +16135551111.

province (String)

The region of the address, such as the province, state, or district.

zip (String)

The zip or postal code of the address.

+ +--- + +### MoneyInput + +

Specifies the fields for a monetary value with currency.

+ + +#### Input fields + + + + + + + + + + + + + + +
NameDescription
amount (Decimal!)

Decimal money amount.

currencyCode (CurrencyCode!)

Currency of the money.

+ +--- + +### SelectedOptionInput + +

Specifies the input fields required for a selected option.

+ + +#### Input fields + + + + + + + + + + + + + + +
NameDescription
name (String!)

The product option’s name.

value (String!)

The product option’s value.

+ +--- + +### TokenizedPaymentInput + +

Specifies the fields required to complete a checkout with +a tokenized payment.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
amount (Money!)

The amount of the payment.

billingAddress (MailingAddressInput!)

The billing address for the payment.

idempotencyKey (String!)

A unique client generated key used to avoid duplicate charges. When a +duplicate payment is found, the original is returned instead of creating a new +one. For more information, refer to Idempotent +requests.

identifier (String)

Public Hash Key used for AndroidPay payments only.

paymentData (String!)

A simple string or JSON containing the required payment data for the tokenized payment.

test (Boolean)

Executes the payment in test mode if possible. Defaults to false.

type (String!)

The type of payment token.

+ +--- + +### TokenizedPaymentInputV2 + +

Specifies the fields required to complete a checkout with +a tokenized payment.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
billingAddress (MailingAddressInput!)

The billing address for the payment.

idempotencyKey (String!)

A unique client generated key used to avoid duplicate charges. When a +duplicate payment is found, the original is returned instead of creating a new +one. For more information, refer to Idempotent +requests.

identifier (String)

Public Hash Key used for AndroidPay payments only.

paymentAmount (MoneyInput!)

The amount and currency of the payment.

paymentData (String!)

A simple string or JSON containing the required payment data for the tokenized payment.

test (Boolean)

Whether to execute the payment in test mode, if possible. Test mode is not +supported in production stores. Defaults to false.

type (String!)

The type of payment token.

+ +--- + +### TokenizedPaymentInputV3 + +

Specifies the fields required to complete a checkout with +a tokenized payment.

+ + +#### Input fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
billingAddress (MailingAddressInput!)

The billing address for the payment.

idempotencyKey (String!)

A unique client generated key used to avoid duplicate charges. When a +duplicate payment is found, the original is returned instead of creating a new +one. For more information, refer to Idempotent +requests.

identifier (String)

Public Hash Key used for AndroidPay payments only.

paymentAmount (MoneyInput!)

The amount and currency of the payment.

paymentData (String!)

A simple string or JSON containing the required payment data for the tokenized payment.

test (Boolean)

Whether to execute the payment in test mode, if possible. Test mode is not +supported in production stores. Defaults to false.

type (PaymentTokenType!)

The type of payment token.

+ +--- \ No newline at end of file diff --git a/example/shopify/interfaces.md b/example/shopify/interfaces.md new file mode 100644 index 0000000000000..c01a1eaadd5c4 --- /dev/null +++ b/example/shopify/interfaces.md @@ -0,0 +1,244 @@ +# Interfaces + +### About interfaces + +[Interfaces](https://graphql.github.io/graphql-spec/June2018/#sec-Interfaces) serve as parent objects from which other objects can inherit. + +### DiscountApplication + +

Discount applications capture the intentions of a discount source at +the time of application.

+ +#### Implemented by + + +- [AutomaticDiscountApplication](objects.md#automaticdiscountapplication) +- [DiscountCodeApplication](objects.md#discountcodeapplication) +- [ManualDiscountApplication](objects.md#manualdiscountapplication) +- [ScriptDiscountApplication](objects.md#scriptdiscountapplication) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
allocationMethod (DiscountApplicationAllocationMethod!)

The method by which the discount’s value is allocated to its entitled items.

targetSelection (DiscountApplicationTargetSelection!)

Which lines of targetType that the discount is allocated over.

targetType (DiscountApplicationTargetType!)

The type of line that the discount is applicable towards.

value (PricingValue!)

The value of the discount application.

+ +--- + +### DisplayableError + +

Represents an error in the input of a mutation.

+ +#### Implemented by + + +- [CheckoutUserError](objects.md#checkoutusererror) +- [CustomerUserError](objects.md#customerusererror) +- [UserError](objects.md#usererror) + +#### Fields + + + + + + + + + + + + + + +
NameDescription
field ([String!])

Path to the input field which caused the error.

message (String!)

The error message.

+ +--- + +### HasMetafields + +

Represents information about the metafields associated to the specified resource.

+ +#### Implemented by + + +- [Product](objects.md#product) +- [ProductVariant](objects.md#productvariant) + +#### Fields + + + + + + + + + + + + + + +
NameDescription
metafield (Metafield) +

The metafield associated with the resource.

+ + + + + + + + + + +
Arguments
+

namespace (String!)

+

Container for a set of metafields (maximum of 20 characters).

+
+

key (String!)

+

Identifier for the metafield (maximum of 30 characters).

+
+
metafields (MetafieldConnection!) +

A paginated list of metafields associated with the resource.

+ + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

namespace (String)

+

Container for a set of metafields (maximum of 20 characters).

+
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
+ +--- + +### Media + +

Represents a media interface.

+ +#### Implemented by + + +- [ExternalVideo](objects.md#externalvideo) +- [MediaImage](objects.md#mediaimage) +- [Model3d](objects.md#model3d) +- [Video](objects.md#video) + +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
alt (String)

A word or phrase to share the nature or contents of a media.

mediaContentType (MediaContentType!)

The media content type.

previewImage (Image)

The preview image for the media.

+ +--- + +### Node + +

An object with an ID to support global identification.

+ +#### Implemented by + + +- [AppliedGiftCard](objects.md#appliedgiftcard) +- [Article](objects.md#article) +- [Blog](objects.md#blog) +- [Checkout](objects.md#checkout) +- [CheckoutLineItem](objects.md#checkoutlineitem) +- [Collection](objects.md#collection) +- [Comment](objects.md#comment) +- [ExternalVideo](objects.md#externalvideo) +- [MailingAddress](objects.md#mailingaddress) +- [MediaImage](objects.md#mediaimage) +- [Metafield](objects.md#metafield) +- [Model3d](objects.md#model3d) +- [Order](objects.md#order) +- [Page](objects.md#page) +- [Payment](objects.md#payment) +- [Product](objects.md#product) +- [ProductOption](objects.md#productoption) +- [ProductVariant](objects.md#productvariant) +- [ShopPolicy](objects.md#shoppolicy) +- [Video](objects.md#video) + +#### Fields + + + + + + + + + + +
NameDescription
id (ID!)

Globally unique identifier.

+ +--- \ No newline at end of file diff --git a/example/shopify/mutations.md b/example/shopify/mutations.md new file mode 100644 index 0000000000000..0f2c133a4bc11 --- /dev/null +++ b/example/shopify/mutations.md @@ -0,0 +1,925 @@ +# Mutations + +### About mutations + +The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. + +### checkoutAttributesUpdate + +

Updates the attributes of a checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- input ([CheckoutAttributesUpdateInput!](input_objects.md#checkoutattributesupdateinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout!](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutAttributesUpdateV2 + +

Updates the attributes of a checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- input ([CheckoutAttributesUpdateV2Input!](input_objects.md#checkoutattributesupdatev2input)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCompleteFree + +

Completes a checkout without providing payment information. You can use this +mutation for free items or items whose purchase price is covered by a gift card.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCompleteWithCreditCard + +

Completes a checkout using a credit card token from Shopify’s Vault.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- payment ([CreditCardPaymentInput!](input_objects.md#creditcardpaymentinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout!](objects.md#checkout)) |

The checkout on which the payment was applied.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| payment ([Payment](objects.md#payment)) |

A representation of the attempted payment.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCompleteWithCreditCardV2 + +

Completes a checkout using a credit card token from Shopify’s card vault. +Before you can complete checkouts using CheckoutCompleteWithCreditCardV2, you +need to request payment processing.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- payment ([CreditCardPaymentInputV2!](input_objects.md#creditcardpaymentinputv2)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The checkout on which the payment was applied.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| payment ([Payment](objects.md#payment)) |

A representation of the attempted payment.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCompleteWithTokenizedPayment + +

Completes a checkout with a tokenized payment.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- payment ([TokenizedPaymentInput!](input_objects.md#tokenizedpaymentinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout!](objects.md#checkout)) |

The checkout on which the payment was applied.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| payment ([Payment](objects.md#payment)) |

A representation of the attempted payment.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCompleteWithTokenizedPaymentV2 + +

Completes a checkout with a tokenized payment.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- payment ([TokenizedPaymentInputV2!](input_objects.md#tokenizedpaymentinputv2)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The checkout on which the payment was applied.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| payment ([Payment](objects.md#payment)) |

A representation of the attempted payment.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCompleteWithTokenizedPaymentV3 + +

Completes a checkout with a tokenized payment.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- payment ([TokenizedPaymentInputV3!](input_objects.md#tokenizedpaymentinputv3)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The checkout on which the payment was applied.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| payment ([Payment](objects.md#payment)) |

A representation of the attempted payment.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCreate + +

Creates a new checkout.

+ +#### Input fields + +- input ([CheckoutCreateInput!](input_objects.md#checkoutcreateinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The new checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCustomerAssociate + +

Associates a customer to the checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- customerAccessToken ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout!](objects.md#checkout)) |

The updated checkout object.

| +| customer ([Customer](objects.md#customer)) |

The associated customer object.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCustomerAssociateV2 + +

Associates a customer to the checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- customerAccessToken ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| customer ([Customer](objects.md#customer)) |

The associated customer object.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCustomerDisassociate + +

Disassociates the current checkout customer from the checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout!](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutCustomerDisassociateV2 + +

Disassociates the current checkout customer from the checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutDiscountCodeApply + +

Applies a discount to an existing checkout using a discount code.

+ +#### Input fields + +- discountCode ([String!](scalars.md#string)) + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout!](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutDiscountCodeApplyV2 + +

Applies a discount to an existing checkout using a discount code.

+ +#### Input fields + +- discountCode ([String!](scalars.md#string)) + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutDiscountCodeRemove + +

Removes the applied discount from an existing checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutEmailUpdate + +

Updates the email on an existing checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- email ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout!](objects.md#checkout)) |

The checkout object with the updated email.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutEmailUpdateV2 + +

Updates the email on an existing checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- email ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The checkout object with the updated email.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutGiftCardApply + +

Applies a gift card to an existing checkout using a gift card code. This will replace all currently applied gift cards.

+ +#### Input fields + +- giftCardCode ([String!](scalars.md#string)) + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout!](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutGiftCardRemove + +

Removes an applied gift card from the checkout.

+ +#### Input fields + +- appliedGiftCardId ([ID!](scalars.md#id)) + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout!](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutGiftCardRemoveV2 + +

Removes an applied gift card from the checkout.

+ +#### Input fields + +- appliedGiftCardId ([ID!](scalars.md#id)) + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutGiftCardsAppend + +

Appends gift cards to an existing checkout.

+ +#### Input fields + +- giftCardCodes ([[String!]!](scalars.md#string)) + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutLineItemsAdd + +

Adds a list of line items to a checkout.

+ +#### Input fields + +- lineItems ([[CheckoutLineItemInput!]!](input_objects.md#checkoutlineiteminput)) + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutLineItemsRemove + +

Removes line items from an existing checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- lineItemIds ([[ID!]!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutLineItemsReplace + +

Sets a list of line items to a checkout.

+ +#### Input fields + +- lineItems ([[CheckoutLineItemInput!]!](input_objects.md#checkoutlineiteminput)) + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| userErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutLineItemsUpdate + +

Updates line items on a checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- lineItems ([[CheckoutLineItemUpdateInput!]!](input_objects.md#checkoutlineitemupdateinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutShippingAddressUpdate + +

Updates the shipping address of an existing checkout.

+ +#### Input fields + +- shippingAddress ([MailingAddressInput!](input_objects.md#mailingaddressinput)) + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout!](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutShippingAddressUpdateV2 + +

Updates the shipping address of an existing checkout.

+ +#### Input fields + +- shippingAddress ([MailingAddressInput!](input_objects.md#mailingaddressinput)) + +- checkoutId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### checkoutShippingLineUpdate + +

Updates the shipping lines on an existing checkout.

+ +#### Input fields + +- checkoutId ([ID!](scalars.md#id)) + +- shippingRateHandle ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| checkout ([Checkout](objects.md#checkout)) |

The updated checkout object.

| +| checkoutUserErrors ([[CheckoutUserError!]!](objects.md#checkoutusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerAccessTokenCreate + +

Creates a customer access token. +The customer access token is required to modify the customer object in any way.

+ +#### Input fields + +- input ([CustomerAccessTokenCreateInput!](input_objects.md#customeraccesstokencreateinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customerAccessToken ([CustomerAccessToken](objects.md#customeraccesstoken)) |

The newly created customer access token object.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerAccessTokenCreateWithMultipass + +

Creates a customer access token using a multipass token instead of email and password. +A customer record is created if customer does not exist. If a customer record already +exists but the record is disabled, then it’s enabled.

+ +#### Input fields + +- multipassToken ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customerAccessToken ([CustomerAccessToken](objects.md#customeraccesstoken)) |

An access token object associated with the customer.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerAccessTokenDelete + +

Permanently destroys a customer access token.

+ +#### Input fields + +- customerAccessToken ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| deletedAccessToken ([String](scalars.md#string)) |

The destroyed access token.

| +| deletedCustomerAccessTokenId ([String](scalars.md#string)) |

ID of the destroyed customer access token.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerAccessTokenRenew + +

Renews a customer access token.

+ +

Access token renewal must happen before a token expires. +If a token has already expired, a new one should be created instead via customerAccessTokenCreate.

+ +#### Input fields + +- customerAccessToken ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customerAccessToken ([CustomerAccessToken](objects.md#customeraccesstoken)) |

The renewed customer access token object.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerActivate + +

Activates a customer.

+ +#### Input fields + +- id ([ID!](scalars.md#id)) + +- input ([CustomerActivateInput!](input_objects.md#customeractivateinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customer ([Customer](objects.md#customer)) |

The customer object.

| +| customerAccessToken ([CustomerAccessToken](objects.md#customeraccesstoken)) |

A newly created customer access token object for the customer.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerActivateByUrl + +

Activates a customer with the activation url received from customerCreate.

+ +#### Input fields + +- activationUrl ([URL!](scalars.md#url)) + +- password ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customer ([Customer](objects.md#customer)) |

The customer that was activated.

| +| customerAccessToken ([CustomerAccessToken](objects.md#customeraccesstoken)) |

A new customer access token for the customer.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerAddressCreate + +

Creates a new address for a customer.

+ +#### Input fields + +- customerAccessToken ([String!](scalars.md#string)) + +- address ([MailingAddressInput!](input_objects.md#mailingaddressinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customerAddress ([MailingAddress](objects.md#mailingaddress)) |

The new customer address object.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerAddressDelete + +

Permanently deletes the address of an existing customer.

+ +#### Input fields + +- id ([ID!](scalars.md#id)) + +- customerAccessToken ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| deletedCustomerAddressId ([String](scalars.md#string)) |

ID of the deleted customer address.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerAddressUpdate + +

Updates the address of an existing customer.

+ +#### Input fields + +- customerAccessToken ([String!](scalars.md#string)) + +- id ([ID!](scalars.md#id)) + +- address ([MailingAddressInput!](input_objects.md#mailingaddressinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customerAddress ([MailingAddress](objects.md#mailingaddress)) |

The customer’s updated mailing address.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerCreate + +

Creates a new customer.

+ +#### Input fields + +- input ([CustomerCreateInput!](input_objects.md#customercreateinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customer ([Customer](objects.md#customer)) |

The created customer object.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerDefaultAddressUpdate + +

Updates the default address of an existing customer.

+ +#### Input fields + +- customerAccessToken ([String!](scalars.md#string)) + +- addressId ([ID!](scalars.md#id)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customer ([Customer](objects.md#customer)) |

The updated customer object.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerRecover + +

Sends a reset password email to the customer, as the first step in the reset password process.

+ +#### Input fields + +- email ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerReset + +

Resets a customer’s password with a token received from CustomerRecover.

+ +#### Input fields + +- id ([ID!](scalars.md#id)) + +- input ([CustomerResetInput!](input_objects.md#customerresetinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customer ([Customer](objects.md#customer)) |

The customer object which was reset.

| +| customerAccessToken ([CustomerAccessToken](objects.md#customeraccesstoken)) |

A newly created customer access token object for the customer.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerResetByUrl + +

Resets a customer’s password with the reset password url received from CustomerRecover.

+ +#### Input fields + +- resetUrl ([URL!](scalars.md#url)) + +- password ([String!](scalars.md#string)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customer ([Customer](objects.md#customer)) |

The customer object which was reset.

| +| customerAccessToken ([CustomerAccessToken](objects.md#customeraccesstoken)) |

A newly created customer access token object for the customer.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- + +### customerUpdate + +

Updates an existing customer.

+ +#### Input fields + +- customerAccessToken ([String!](scalars.md#string)) + +- customer ([CustomerUpdateInput!](input_objects.md#customerupdateinput)) + + +#### Returns + +| Name | Description | +|------|-------------| +| customer ([Customer](objects.md#customer)) |

The updated customer object.

| +| customerAccessToken ([CustomerAccessToken](objects.md#customeraccesstoken)) |

The newly created customer access token. If the customer’s password is updated, all previous access tokens +(including the one used to perform this mutation) become invalid, and a new token is generated.

| +| customerUserErrors ([[CustomerUserError!]!](objects.md#customerusererror)) |

List of errors that occurred executing the mutation.

| +| userErrors ([[UserError!]!](objects.md#usererror)) |

List of errors that occurred executing the mutation.

| + +--- \ No newline at end of file diff --git a/example/shopify/objects.md b/example/shopify/objects.md new file mode 100644 index 0000000000000..1b4271b1e8e33 --- /dev/null +++ b/example/shopify/objects.md @@ -0,0 +1,6752 @@ +# Objects + +### About objects + +[Objects](https://graphql.github.io/graphql-spec/June2018/#sec-Objects) in GraphQL represent the resources you can access. An object can contain a list of fields, which are specifically typed. + +### ApiVersion + +

A version of the API.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
displayName (String!)

The human-readable name of the version.

handle (String!)

The unique identifier of an ApiVersion. All supported API versions have a date-based (YYYY-MM) or unstable handle.

supported (Boolean!)

Whether the version is supported by Shopify.

+ +--- + +### AppliedGiftCard + +

Details about the gift card used on the checkout.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
amountUsed (Money!)

The amount that was taken from the gift card by applying it.

amountUsedV2 (MoneyV2!)

The amount that was taken from the gift card by applying it.

balance (Money!)

The amount left on the gift card.

balanceV2 (MoneyV2!)

The amount left on the gift card.

id (ID!)

Globally unique identifier.

lastCharacters (String!)

The last characters of the gift card.

presentmentAmountUsed (MoneyV2!)

The amount that was applied to the checkout in its currency.

+ +--- + +### Article + +

An article in an online store blog.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
author (ArticleAuthor!)

The article’s author.

authorV2 (ArticleAuthor)

The article’s author.

blog (Blog!)

The blog that the article belongs to.

comments (CommentConnection!) +

List of comments posted on the article.

+ + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
content (String!) +

Stripped content of the article, single line with HTML tags removed.

+ + + + + + + +
Arguments
+

truncateAt (Int)

+

Truncates string after the given length.

+
+
contentHtml (HTML!)

The content of the article, complete with HTML formatting.

excerpt (String) +

Stripped excerpt of the article, single line with HTML tags removed.

+ + + + + + + +
Arguments
+

truncateAt (Int)

+

Truncates string after the given length.

+
+
excerptHtml (HTML)

The excerpt of the article, complete with HTML formatting.

handle (String!)

A human-friendly unique string for the Article automatically generated from its title.

id (ID!)

Globally unique identifier.

image (Image) +

The image associated with the article.

+ + + + + + + + + + + + + + + + +
Arguments
+

maxWidth (Int)

+

Image width in pixels between 1 and 2048. This argument is deprecated: Use maxWidth on Image.transformedSrc instead.

+
+

maxHeight (Int)

+

Image height in pixels between 1 and 2048. This argument is deprecated: Use +maxHeight on Image.transformedSrc instead.

+
+

crop (CropRegion)

+

Crops the image according to the specified region. This argument is +deprecated: Use crop on Image.transformedSrc instead.

+
+

scale (Int)

+

Image size multiplier for high-resolution retina displays. Must be between 1 +and 3. This argument is deprecated: Use scale on Image.transformedSrc instead.

+
+
publishedAt (DateTime!)

The date and time when the article was published.

seo (SEO)

The article’s SEO information.

tags ([String!]!)

A categorization that a article can be tagged with.

title (String!)

The article’s name.

url (URL!)

The url pointing to the article accessible from the web.

+ +--- + +### ArticleAuthor + +

The author of an article.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
bio (String)

The author’s bio.

email (String!)

The author’s email.

firstName (String!)

The author’s first name.

lastName (String!)

The author’s last name.

name (String!)

The author’s full name.

+ +--- + +### ArticleConnection + +

An auto-generated type for paginating through multiple Articles.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([ArticleEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### ArticleEdge + +

An auto-generated type which holds one Article and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (Article!)

The item at the end of ArticleEdge.

+ +--- + +### Attribute + +

Represents a generic custom attribute.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
key (String!)

Key or name of the attribute.

value (String)

Value of the attribute.

+ +--- + +### AutomaticDiscountApplication + +

Automatic discount applications capture the intentions of a discount that was automatically applied.

+ +#### Implements + + +- [DiscountApplication](interfaces.md#discountapplication) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
allocationMethod (DiscountApplicationAllocationMethod!)

The method by which the discount’s value is allocated to its entitled items.

targetSelection (DiscountApplicationTargetSelection!)

Which lines of targetType that the discount is allocated over.

targetType (DiscountApplicationTargetType!)

The type of line that the discount is applicable towards.

title (String!)

The title of the application.

value (PricingValue!)

The value of the discount application.

+ +--- + +### AvailableShippingRates + +

A collection of available shipping rates for a checkout.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
ready (Boolean!)

Whether or not the shipping rates are ready. +The shippingRates field is null when this value is false. +This field should be polled until its value becomes true.

shippingRates ([ShippingRate!])

The fetched shipping rates. null until the ready field is true.

+ +--- + +### Blog + +

An online store blog.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
articleByHandle (Article) +

Find an article by its handle.

+ + + + + + + +
Arguments
+

handle (String!)

+

The handle of the article.

+
+
articles (ArticleConnection!) +

List of the blog’s articles.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (ArticleSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - author + - blog_title + - created_at + - tag + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

+
+
authors ([ArticleAuthor!]!)

The authors who have contributed to the blog.

handle (String!)

A human-friendly unique string for the Blog automatically generated from its title.

id (ID!)

Globally unique identifier.

seo (SEO)

The blog’s SEO information.

title (String!)

The blogs’s title.

url (URL!)

The url pointing to the blog accessible from the web.

+ +--- + +### BlogConnection + +

An auto-generated type for paginating through multiple Blogs.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([BlogEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### BlogEdge + +

An auto-generated type which holds one Blog and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (Blog!)

The item at the end of BlogEdge.

+ +--- + +### Checkout + +

A container for all the information required to checkout items and pay.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
appliedGiftCards ([AppliedGiftCard!]!)

The gift cards used on the checkout.

availableShippingRates (AvailableShippingRates)

The available shipping rates for this Checkout. +Should only be used when checkout requiresShipping is true and +the shipping address is valid.

completedAt (DateTime)

The date and time when the checkout was completed.

createdAt (DateTime!)

The date and time when the checkout was created.

currencyCode (CurrencyCode!)

The currency code for the Checkout.

customAttributes ([Attribute!]!)

A list of extra information that is added to the checkout.

customer (Customer)

The customer associated with the checkout.

discountApplications (DiscountApplicationConnection!) +

Discounts that have been applied on the checkout.

+ + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
email (String)

The email attached to this checkout.

id (ID!)

Globally unique identifier.

lineItems (CheckoutLineItemConnection!) +

A list of line item objects, each one containing information about an item in the checkout.

+ + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
lineItemsSubtotalPrice (MoneyV2!)

The sum of all the prices of all the items in the checkout. Duties, taxes, shipping and discounts excluded.

note (String)

The note associated with the checkout.

order (Order)

The resulting order from a paid checkout.

orderStatusUrl (URL)

The Order Status Page for this Checkout, null when checkout is not completed.

paymentDue (Money!)

The amount left to be paid. This is equal to the cost of the line items, taxes +and shipping minus discounts and gift cards.

paymentDueV2 (MoneyV2!)

The amount left to be paid. This is equal to the cost of the line items, +duties, taxes and shipping minus discounts and gift cards.

ready (Boolean!)

Whether or not the Checkout is ready and can be completed. Checkouts may +have asynchronous operations that can take time to finish. If you want +to complete a checkout or ensure all the fields are populated and up to +date, polling is required until the value is true.

requiresShipping (Boolean!)

States whether or not the fulfillment requires shipping.

shippingAddress (MailingAddress)

The shipping address to where the line items will be shipped.

shippingDiscountAllocations ([DiscountAllocation!]!)

The discounts that have been allocated onto the shipping line by discount applications.

shippingLine (ShippingRate)

Once a shipping rate is selected by the customer it is transitioned to a shipping_line object.

subtotalPrice (Money!)

Price of the checkout before shipping and taxes.

subtotalPriceV2 (MoneyV2!)

Price of the checkout before duties, shipping and taxes.

taxExempt (Boolean!)

Specifies if the Checkout is tax exempt.

taxesIncluded (Boolean!)

Specifies if taxes are included in the line item and shipping line prices.

totalDuties (MoneyV2)

The sum of all the duties applied to the line items in the checkout.

totalPrice (Money!)

The sum of all the prices of all the items in the checkout, taxes and discounts included.

totalPriceV2 (MoneyV2!)

The sum of all the prices of all the items in the checkout, duties, taxes and discounts included.

totalTax (Money!)

The sum of all the taxes applied to the line items and shipping lines in the checkout.

totalTaxV2 (MoneyV2!)

The sum of all the taxes applied to the line items and shipping lines in the checkout.

updatedAt (DateTime!)

The date and time when the checkout was last updated.

webUrl (URL!)

The url pointing to the checkout accessible from the web.

+ +--- + +### CheckoutAttributesUpdatePayload + +

Return type for checkoutAttributesUpdate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout!)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutAttributesUpdateV2Payload + +

Return type for checkoutAttributesUpdateV2 mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCompleteFreePayload + +

Return type for checkoutCompleteFree mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCompleteWithCreditCardPayload + +

Return type for checkoutCompleteWithCreditCard mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout!)

The checkout on which the payment was applied.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

payment (Payment)

A representation of the attempted payment.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCompleteWithCreditCardV2Payload + +

Return type for checkoutCompleteWithCreditCardV2 mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The checkout on which the payment was applied.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

payment (Payment)

A representation of the attempted payment.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCompleteWithTokenizedPaymentPayload + +

Return type for checkoutCompleteWithTokenizedPayment mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout!)

The checkout on which the payment was applied.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

payment (Payment)

A representation of the attempted payment.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCompleteWithTokenizedPaymentV2Payload + +

Return type for checkoutCompleteWithTokenizedPaymentV2 mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The checkout on which the payment was applied.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

payment (Payment)

A representation of the attempted payment.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCompleteWithTokenizedPaymentV3Payload + +

Return type for checkoutCompleteWithTokenizedPaymentV3 mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The checkout on which the payment was applied.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

payment (Payment)

A representation of the attempted payment.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCreatePayload + +

Return type for checkoutCreate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The new checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCustomerAssociatePayload + +

Return type for checkoutCustomerAssociate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout!)

The updated checkout object.

customer (Customer)

The associated customer object.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCustomerAssociateV2Payload + +

Return type for checkoutCustomerAssociateV2 mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

customer (Customer)

The associated customer object.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCustomerDisassociatePayload + +

Return type for checkoutCustomerDisassociate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout!)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutCustomerDisassociateV2Payload + +

Return type for checkoutCustomerDisassociateV2 mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutDiscountCodeApplyPayload + +

Return type for checkoutDiscountCodeApply mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout!)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutDiscountCodeApplyV2Payload + +

Return type for checkoutDiscountCodeApplyV2 mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutDiscountCodeRemovePayload + +

Return type for checkoutDiscountCodeRemove mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutEmailUpdatePayload + +

Return type for checkoutEmailUpdate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout!)

The checkout object with the updated email.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutEmailUpdateV2Payload + +

Return type for checkoutEmailUpdateV2 mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The checkout object with the updated email.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutGiftCardApplyPayload + +

Return type for checkoutGiftCardApply mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout!)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutGiftCardRemovePayload + +

Return type for checkoutGiftCardRemove mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout!)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutGiftCardRemoveV2Payload + +

Return type for checkoutGiftCardRemoveV2 mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutGiftCardsAppendPayload + +

Return type for checkoutGiftCardsAppend mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutLineItem + +

A single line item in the checkout, grouped by variant and attributes.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
customAttributes ([Attribute!]!)

Extra information in the form of an array of Key-Value pairs about the line item.

discountAllocations ([DiscountAllocation!]!)

The discounts that have been allocated onto the checkout line item by discount applications.

id (ID!)

Globally unique identifier.

quantity (Int!)

The quantity of the line item.

title (String!)

Title of the line item. Defaults to the product’s title.

unitPrice (MoneyV2)

Unit price of the line item.

variant (ProductVariant)

Product variant of the line item.

+ +--- + +### CheckoutLineItemConnection + +

An auto-generated type for paginating through multiple CheckoutLineItems.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([CheckoutLineItemEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### CheckoutLineItemEdge + +

An auto-generated type which holds one CheckoutLineItem and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (CheckoutLineItem!)

The item at the end of CheckoutLineItemEdge.

+ +--- + +### CheckoutLineItemsAddPayload + +

Return type for checkoutLineItemsAdd mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutLineItemsRemovePayload + +

Return type for checkoutLineItemsRemove mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutLineItemsReplacePayload + +

Return type for checkoutLineItemsReplace mutation.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

userErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutLineItemsUpdatePayload + +

Return type for checkoutLineItemsUpdate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutShippingAddressUpdatePayload + +

Return type for checkoutShippingAddressUpdate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout!)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutShippingAddressUpdateV2Payload + +

Return type for checkoutShippingAddressUpdateV2 mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutShippingLineUpdatePayload + +

Return type for checkoutShippingLineUpdate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
checkout (Checkout)

The updated checkout object.

checkoutUserErrors ([CheckoutUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CheckoutUserError + +

Represents an error that happens during execution of a checkout mutation.

+ +#### Implements + + +- [DisplayableError](interfaces.md#displayableerror) + +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
code (CheckoutErrorCode)

Error code to uniquely identify the error.

field ([String!])

Path to the input field which caused the error.

message (String!)

The error message.

+ +--- + +### Collection + +

A collection represents a grouping of products that a shop owner can create to +organize them or make their shops easier to browse.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
description (String!) +

Stripped description of the collection, single line with HTML tags removed.

+ + + + + + + +
Arguments
+

truncateAt (Int)

+

Truncates string after the given length.

+
+
descriptionHtml (HTML!)

The description of the collection, complete with HTML formatting.

handle (String!)

A human-friendly unique string for the collection automatically generated from its title. +Limit of 255 characters.

id (ID!)

Globally unique identifier.

image (Image) +

Image associated with the collection.

+ + + + + + + + + + + + + + + + +
Arguments
+

maxWidth (Int)

+

Image width in pixels between 1 and 2048. This argument is deprecated: Use maxWidth on Image.transformedSrc instead.

+
+

maxHeight (Int)

+

Image height in pixels between 1 and 2048. This argument is deprecated: Use +maxHeight on Image.transformedSrc instead.

+
+

crop (CropRegion)

+

Crops the image according to the specified region. This argument is +deprecated: Use crop on Image.transformedSrc instead.

+
+

scale (Int)

+

Image size multiplier for high-resolution retina displays. Must be between 1 +and 3. This argument is deprecated: Use scale on Image.transformedSrc instead.

+
+
products (ProductConnection!) +

List of products in the collection.

+ + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (ProductCollectionSortKeys)

+

Sort the underlying list by the given key.

+
+
title (String!)

The collection’s name. Limit of 255 characters.

updatedAt (DateTime!)

The date and time when the collection was last modified.

+ +--- + +### CollectionConnection + +

An auto-generated type for paginating through multiple Collections.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([CollectionEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### CollectionEdge + +

An auto-generated type which holds one Collection and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (Collection!)

The item at the end of CollectionEdge.

+ +--- + +### Comment + +

A comment on an article.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
author (CommentAuthor!)

The comment’s author.

content (String!) +

Stripped content of the comment, single line with HTML tags removed.

+ + + + + + + +
Arguments
+

truncateAt (Int)

+

Truncates string after the given length.

+
+
contentHtml (HTML!)

The content of the comment, complete with HTML formatting.

id (ID!)

Globally unique identifier.

+ +--- + +### CommentAuthor + +

The author of a comment.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
email (String!)

The author’s email.

name (String!)

The author’s name.

+ +--- + +### CommentConnection + +

An auto-generated type for paginating through multiple Comments.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([CommentEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### CommentEdge + +

An auto-generated type which holds one Comment and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (Comment!)

The item at the end of CommentEdge.

+ +--- + +### CreditCard + +

Credit card information used for a payment.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
brand (String)

The brand of the credit card.

expiryMonth (Int)

The expiry month of the credit card.

expiryYear (Int)

The expiry year of the credit card.

firstDigits (String)

The credit card’s BIN number.

firstName (String)

The first name of the card holder.

lastDigits (String)

The last 4 digits of the credit card.

lastName (String)

The last name of the card holder.

maskedNumber (String)

The masked credit card number with only the last 4 digits displayed.

+ +--- + +### Customer + +

A customer represents a customer account with the shop. Customer accounts store +contact information for the customer, saving logged-in customers the trouble of +having to provide it at every checkout.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
acceptsMarketing (Boolean!)

Indicates whether the customer has consented to be sent marketing material via email.

addresses (MailingAddressConnection!) +

A list of addresses for the customer.

+ + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
createdAt (DateTime!)

The date and time when the customer was created.

defaultAddress (MailingAddress)

The customer’s default address.

displayName (String!)

The customer’s name, email or phone number.

email (String)

The customer’s email address.

firstName (String)

The customer’s first name.

id (ID!)

A unique identifier for the customer.

lastIncompleteCheckout (Checkout)

The customer’s most recently updated, incomplete checkout.

lastName (String)

The customer’s last name.

orders (OrderConnection!) +

The orders associated with the customer.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (OrderSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - processed_at

+ +

See the detailed search syntax +for more information about using filters.

+
+
phone (String)

The customer’s phone number.

tags ([String!]!)

A comma separated list of tags that have been added to the customer. +Additional access scope required: unauthenticated_read_customer_tags.

updatedAt (DateTime!)

The date and time when the customer information was updated.

+ +--- + +### CustomerAccessToken + +

A CustomerAccessToken represents the unique token required to make modifications to the customer object.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
accessToken (String!)

The customer’s access token.

expiresAt (DateTime!)

The date and time when the customer access token expires.

+ +--- + +### CustomerAccessTokenCreatePayload + +

Return type for customerAccessTokenCreate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
customerAccessToken (CustomerAccessToken)

The newly created customer access token object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerAccessTokenCreateWithMultipassPayload + +

Return type for customerAccessTokenCreateWithMultipass mutation.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
customerAccessToken (CustomerAccessToken)

An access token object associated with the customer.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerAccessTokenDeletePayload + +

Return type for customerAccessTokenDelete mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
deletedAccessToken (String)

The destroyed access token.

deletedCustomerAccessTokenId (String)

ID of the destroyed customer access token.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerAccessTokenRenewPayload + +

Return type for customerAccessTokenRenew mutation.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
customerAccessToken (CustomerAccessToken)

The renewed customer access token object.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerActivateByUrlPayload + +

Return type for customerActivateByUrl mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
customer (Customer)

The customer that was activated.

customerAccessToken (CustomerAccessToken)

A new customer access token for the customer.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerActivatePayload + +

Return type for customerActivate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
customer (Customer)

The customer object.

customerAccessToken (CustomerAccessToken)

A newly created customer access token object for the customer.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerAddressCreatePayload + +

Return type for customerAddressCreate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
customerAddress (MailingAddress)

The new customer address object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerAddressDeletePayload + +

Return type for customerAddressDelete mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

deletedCustomerAddressId (String)

ID of the deleted customer address.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerAddressUpdatePayload + +

Return type for customerAddressUpdate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
customerAddress (MailingAddress)

The customer’s updated mailing address.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerCreatePayload + +

Return type for customerCreate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
customer (Customer)

The created customer object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerDefaultAddressUpdatePayload + +

Return type for customerDefaultAddressUpdate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
customer (Customer)

The updated customer object.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerRecoverPayload + +

Return type for customerRecover mutation.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerResetByUrlPayload + +

Return type for customerResetByUrl mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
customer (Customer)

The customer object which was reset.

customerAccessToken (CustomerAccessToken)

A newly created customer access token object for the customer.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerResetPayload + +

Return type for customerReset mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
customer (Customer)

The customer object which was reset.

customerAccessToken (CustomerAccessToken)

A newly created customer access token object for the customer.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerUpdatePayload + +

Return type for customerUpdate mutation.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
customer (Customer)

The updated customer object.

customerAccessToken (CustomerAccessToken)

The newly created customer access token. If the customer’s password is updated, all previous access tokens +(including the one used to perform this mutation) become invalid, and a new token is generated.

customerUserErrors ([CustomerUserError!]!)

List of errors that occurred executing the mutation.

userErrors ([UserError!]!)

List of errors that occurred executing the mutation.

+ +--- + +### CustomerUserError + +

Represents an error that happens during execution of a customer mutation.

+ +#### Implements + + +- [DisplayableError](interfaces.md#displayableerror) + +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
code (CustomerErrorCode)

Error code to uniquely identify the error.

field ([String!])

Path to the input field which caused the error.

message (String!)

The error message.

+ +--- + +### DiscountAllocation + +

An amount discounting the line that has been allocated by a discount.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
allocatedAmount (MoneyV2!)

Amount of discount allocated.

discountApplication (DiscountApplication!)

The discount this allocated amount originated from.

+ +--- + +### DiscountApplicationConnection + +

An auto-generated type for paginating through multiple DiscountApplications.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([DiscountApplicationEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### DiscountApplicationEdge + +

An auto-generated type which holds one DiscountApplication and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (DiscountApplication!)

The item at the end of DiscountApplicationEdge.

+ +--- + +### DiscountCodeApplication + +

Discount code applications capture the intentions of a discount code at +the time that it is applied.

+ +#### Implements + + +- [DiscountApplication](interfaces.md#discountapplication) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
allocationMethod (DiscountApplicationAllocationMethod!)

The method by which the discount’s value is allocated to its entitled items.

applicable (Boolean!)

Specifies whether the discount code was applied successfully.

code (String!)

The string identifying the discount code that was used at the time of application.

targetSelection (DiscountApplicationTargetSelection!)

Which lines of targetType that the discount is allocated over.

targetType (DiscountApplicationTargetType!)

The type of line that the discount is applicable towards.

value (PricingValue!)

The value of the discount application.

+ +--- + +### Domain + +

Represents a web address.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
host (String!)

The host name of the domain (eg: example.com).

sslEnabled (Boolean!)

Whether SSL is enabled or not.

url (URL!)

The URL of the domain (eg: https://example.com).

+ +--- + +### ExternalVideo + +

Represents a video hosted outside of Shopify.

+ +#### Implements + + +- [Media](interfaces.md#media) +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
alt (String)

A word or phrase to share the nature or contents of a media.

embeddedUrl (URL!)

The URL.

host (MediaHost!)

The host of the external video.

id (ID!)

Globally unique identifier.

mediaContentType (MediaContentType!)

The media content type.

previewImage (Image)

The preview image for the media.

+ +--- + +### Fulfillment + +

Represents a single fulfillment in an order.

+ +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
fulfillmentLineItems (FulfillmentLineItemConnection!) +

List of the fulfillment’s line items.

+ + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
trackingCompany (String)

The name of the tracking company.

trackingInfo ([FulfillmentTrackingInfo!]!) +

Tracking information associated with the fulfillment, +such as the tracking number and tracking URL.

+ + + + + + + +
Arguments
+

first (Int)

+

Truncate the array result to this size.

+
+
+ +--- + +### FulfillmentLineItem + +

Represents a single line item in a fulfillment. There is at most one fulfillment line item for each order line item.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
lineItem (OrderLineItem!)

The associated order’s line item.

quantity (Int!)

The amount fulfilled in this fulfillment.

+ +--- + +### FulfillmentLineItemConnection + +

An auto-generated type for paginating through multiple FulfillmentLineItems.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([FulfillmentLineItemEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### FulfillmentLineItemEdge + +

An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (FulfillmentLineItem!)

The item at the end of FulfillmentLineItemEdge.

+ +--- + +### FulfillmentTrackingInfo + +

Tracking information associated with the fulfillment.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
number (String)

The tracking number of the fulfillment.

url (URL)

The URL to track the fulfillment.

+ +--- + +### Image + +

Represents an image resource.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
altText (String)

A word or phrase to share the nature or contents of an image.

height (Int)

The original height of the image in pixels. Returns null if the image is not hosted by Shopify.

id (ID)

A unique identifier for the image.

originalSrc (URL!)

The location of the original image as a URL.

+ +

If there are any existing transformations in the original source URL, they will remain and not be stripped.

src (URL!)

The location of the image as a URL.

transformedSrc (URL!) +

The location of the transformed image as a URL.

+ +

All transformation arguments are considered “best-effort”. If they can be applied to an image, they will be. +Otherwise any transformations which an image type does not support will be ignored.

+ + + + + + + + + + + + + + + + + + + +
Arguments
+

maxWidth (Int)

+

Image width in pixels between 1 and 5760.

+
+

maxHeight (Int)

+

Image height in pixels between 1 and 5760.

+
+

crop (CropRegion)

+

Crops the image according to the specified region.

+
+

scale (Int)

+

Image size multiplier for high-resolution retina displays. Must be between 1 and 3.

+
+

preferredContentType (ImageContentType)

+

Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported).

+
+
width (Int)

The original width of the image in pixels. Returns null if the image is not hosted by Shopify.

+ +--- + +### ImageConnection + +

An auto-generated type for paginating through multiple Images.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([ImageEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### ImageEdge + +

An auto-generated type which holds one Image and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (Image!)

The item at the end of ImageEdge.

+ +--- + +### MailingAddress + +

Represents a mailing address for customers and shipping.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
address1 (String)

The first line of the address. Typically the street address or PO Box number.

address2 (String)

The second line of the address. Typically the number of the apartment, suite, or unit.

city (String)

The name of the city, district, village, or town.

company (String)

The name of the customer’s company or organization.

country (String)

The name of the country.

countryCode (String)

The two-letter code for the country of the address.

+ +

For example, US.

countryCodeV2 (CountryCode)

The two-letter code for the country of the address.

+ +

For example, US.

firstName (String)

The first name of the customer.

formatted ([String!]!) +

A formatted version of the address, customized by the provided arguments.

+ + + + + + + + + + +
Arguments
+

withName (Boolean)

+

Whether to include the customer’s name in the formatted address.

+
+

withCompany (Boolean)

+

Whether to include the customer’s company in the formatted address.

+
+
formattedArea (String)

A comma-separated list of the values for city, province, and country.

id (ID!)

Globally unique identifier.

lastName (String)

The last name of the customer.

latitude (Float)

The latitude coordinate of the customer address.

longitude (Float)

The longitude coordinate of the customer address.

name (String)

The full name of the customer, based on firstName and lastName.

phone (String)

A unique phone number for the customer.

+ +

Formatted using E.164 standard. For example, +16135551111.

province (String)

The region of the address, such as the province, state, or district.

provinceCode (String)

The two-letter code for the region.

+ +

For example, ON.

zip (String)

The zip or postal code of the address.

+ +--- + +### MailingAddressConnection + +

An auto-generated type for paginating through multiple MailingAddresses.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([MailingAddressEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### MailingAddressEdge + +

An auto-generated type which holds one MailingAddress and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (MailingAddress!)

The item at the end of MailingAddressEdge.

+ +--- + +### ManualDiscountApplication + +

Manual discount applications capture the intentions of a discount that was manually created.

+ +#### Implements + + +- [DiscountApplication](interfaces.md#discountapplication) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
allocationMethod (DiscountApplicationAllocationMethod!)

The method by which the discount’s value is allocated to its entitled items.

description (String)

The description of the application.

targetSelection (DiscountApplicationTargetSelection!)

Which lines of targetType that the discount is allocated over.

targetType (DiscountApplicationTargetType!)

The type of line that the discount is applicable towards.

title (String!)

The title of the application.

value (PricingValue!)

The value of the discount application.

+ +--- + +### MediaConnection + +

An auto-generated type for paginating through multiple Media.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([MediaEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### MediaEdge + +

An auto-generated type which holds one Media and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (Media!)

The item at the end of MediaEdge.

+ +--- + +### MediaImage + +

Represents a Shopify hosted image.

+ +#### Implements + + +- [Media](interfaces.md#media) +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
alt (String)

A word or phrase to share the nature or contents of a media.

id (ID!)

Globally unique identifier.

image (Image)

The image for the media.

mediaContentType (MediaContentType!)

The media content type.

previewImage (Image)

The preview image for the media.

+ +--- + +### Metafield + +

Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are +comprised of keys, values, and value types.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
createdAt (DateTime!)

The date and time when the storefront metafield was created.

description (String)

The description of a metafield.

id (ID!)

Globally unique identifier.

key (String!)

The key name for a metafield.

namespace (String!)

The namespace for a metafield.

parentResource (MetafieldParentResource!)

The parent object that the metafield belongs to.

updatedAt (DateTime!)

The date and time when the storefront metafield was updated.

value (String!)

The value of a metafield.

valueType (MetafieldValueType!)

Represents the metafield value type.

+ +--- + +### MetafieldConnection + +

An auto-generated type for paginating through multiple Metafields.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([MetafieldEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### MetafieldEdge + +

An auto-generated type which holds one Metafield and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (Metafield!)

The item at the end of MetafieldEdge.

+ +--- + +### Model3d + +

Represents a Shopify hosted 3D model.

+ +#### Implements + + +- [Media](interfaces.md#media) +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
alt (String)

A word or phrase to share the nature or contents of a media.

id (ID!)

Globally unique identifier.

mediaContentType (MediaContentType!)

The media content type.

previewImage (Image)

The preview image for the media.

sources ([Model3dSource!]!)

The sources for a 3d model.

+ +--- + +### Model3dSource + +

Represents a source for a Shopify hosted 3d model.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
filesize (Int!)

The filesize of the 3d model.

format (String!)

The format of the 3d model.

mimeType (String!)

The MIME type of the 3d model.

url (String!)

The URL of the 3d model.

+ +--- + +### MoneyV2 + +

A monetary value with currency.

+ +

To format currencies, combine this type’s amount and currencyCode fields with your client’s locale.

+ +

For example, in JavaScript you could use Intl.NumberFormat:

+ +
new Intl.NumberFormat(locale, {
+  style: 'currency',
+  currency: currencyCode
+}).format(amount);
+
+ +

Other formatting libraries include:

+ + + +

For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations +(such as TwitterCldr).

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
amount (Decimal!)

Decimal money amount.

currencyCode (CurrencyCode!)

Currency of the money.

+ +--- + +### MoneyV2Connection + +

An auto-generated type for paginating through multiple MoneyV2s.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([MoneyV2Edge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### MoneyV2Edge + +

An auto-generated type which holds one MoneyV2 and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (MoneyV2!)

The item at the end of MoneyV2Edge.

+ +--- + +### Order + +

An order is a customer’s completed request to purchase one or more products from +a shop. An order is created when a customer completes the checkout process, +during which time they provides an email address, billing address and payment information.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
cancelReason (OrderCancelReason)

The reason for the order’s cancellation. Returns null if the order wasn’t canceled.

canceledAt (DateTime)

The date and time when the order was canceled. Returns null if the order wasn’t canceled.

currencyCode (CurrencyCode!)

The code of the currency used for the payment.

currentSubtotalPrice (MoneyV2!)

The subtotal of line items and their discounts, excluding line items that have +been removed. Does not contain order-level discounts, duties, shipping costs, +or shipping discounts. Taxes are not included unless the order is a +taxes-included order.

currentTotalDuties (MoneyV2)

The total cost of duties for the order, including refunds.

currentTotalPrice (MoneyV2!)

The total amount of the order, including duties, taxes and discounts, minus amounts for line items that have been removed.

currentTotalTax (MoneyV2!)

The total of all taxes applied to the order, excluding taxes for returned line items.

customerLocale (String)

The locale code in which this specific order happened.

customerUrl (URL)

The unique URL that the customer can use to access the order.

discountApplications (DiscountApplicationConnection!) +

Discounts that have been applied on the order.

+ + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
edited (Boolean!)

Whether the order has had any edits applied or not.

email (String)

The customer’s email address.

financialStatus (OrderFinancialStatus)

The financial status of the order.

fulfillmentStatus (OrderFulfillmentStatus!)

The fulfillment status for the order.

id (ID!)

Globally unique identifier.

lineItems (OrderLineItemConnection!) +

List of the order’s line items.

+ + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
name (String!)

Unique identifier for the order that appears on the order. +For example, #1000 or _Store1001.

orderNumber (Int!)

A unique numeric identifier for the order for use by shop owner and customer.

originalTotalDuties (MoneyV2)

The total cost of duties charged at checkout.

originalTotalPrice (MoneyV2!)

The total price of the order before any applied edits.

phone (String)

The customer’s phone number for receiving SMS notifications.

processedAt (DateTime!)

The date and time when the order was imported. +This value can be set to dates in the past when importing from other systems. +If no value is provided, it will be auto-generated based on current date and time.

shippingAddress (MailingAddress)

The address to where the order will be shipped.

shippingDiscountAllocations ([DiscountAllocation!]!)

The discounts that have been allocated onto the shipping line by discount applications.

statusUrl (URL!)

The unique URL for the order’s status page.

subtotalPrice (Money)

Price of the order before shipping and taxes.

subtotalPriceV2 (MoneyV2)

Price of the order before duties, shipping and taxes.

successfulFulfillments ([Fulfillment!]) +

List of the order’s successful fulfillments.

+ + + + + + + +
Arguments
+

first (Int)

+

Truncate the array result to this size.

+
+
totalPrice (Money!)

The sum of all the prices of all the items in the order, taxes and discounts included (must be positive).

totalPriceV2 (MoneyV2!)

The sum of all the prices of all the items in the order, duties, taxes and discounts included (must be positive).

totalRefunded (Money!)

The total amount that has been refunded.

totalRefundedV2 (MoneyV2!)

The total amount that has been refunded.

totalShippingPrice (Money!)

The total cost of shipping.

totalShippingPriceV2 (MoneyV2!)

The total cost of shipping.

totalTax (Money)

The total cost of taxes.

totalTaxV2 (MoneyV2)

The total cost of taxes.

+ +--- + +### OrderConnection + +

An auto-generated type for paginating through multiple Orders.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([OrderEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### OrderEdge + +

An auto-generated type which holds one Order and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (Order!)

The item at the end of OrderEdge.

+ +--- + +### OrderLineItem + +

Represents a single line in an order. There is one line item for each distinct product variant.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
currentQuantity (Int!)

The number of entries associated to the line item minus the items that have been removed.

customAttributes ([Attribute!]!)

List of custom attributes associated to the line item.

discountAllocations ([DiscountAllocation!]!)

The discounts that have been allocated onto the order line item by discount applications.

discountedTotalPrice (MoneyV2!)

The total price of the line item, including discounts, and displayed in the presentment currency.

originalTotalPrice (MoneyV2!)

The total price of the line item, not including any discounts. The total price +is calculated using the original unit price multiplied by the quantity, and it +is displayed in the presentment currency.

quantity (Int!)

The number of products variants associated to the line item.

title (String!)

The title of the product combined with title of the variant.

variant (ProductVariant)

The product variant object associated to the line item.

+ +--- + +### OrderLineItemConnection + +

An auto-generated type for paginating through multiple OrderLineItems.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([OrderLineItemEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### OrderLineItemEdge + +

An auto-generated type which holds one OrderLineItem and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (OrderLineItem!)

The item at the end of OrderLineItemEdge.

+ +--- + +### Page + +

Shopify merchants can create pages to hold static HTML content. Each Page object +represents a custom page on the online store.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
body (HTML!)

The description of the page, complete with HTML formatting.

bodySummary (String!)

Summary of the page body.

createdAt (DateTime!)

The timestamp of the page creation.

handle (String!)

A human-friendly unique string for the page automatically generated from its title.

id (ID!)

Globally unique identifier.

seo (SEO)

The page’s SEO information.

title (String!)

The title of the page.

updatedAt (DateTime!)

The timestamp of the latest page update.

url (URL!)

The url pointing to the page accessible from the web.

+ +--- + +### PageConnection + +

An auto-generated type for paginating through multiple Pages.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([PageEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### PageEdge + +

An auto-generated type which holds one Page and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (Page!)

The item at the end of PageEdge.

+ +--- + +### PageInfo + +

Information about pagination in a connection.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
hasNextPage (Boolean!)

Indicates if there are more pages to fetch.

hasPreviousPage (Boolean!)

Indicates if there are any pages prior to the current page.

+ +--- + +### Payment + +

A payment applied to a checkout.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
amount (Money!)

The amount of the payment.

amountV2 (MoneyV2!)

The amount of the payment.

billingAddress (MailingAddress)

The billing address for the payment.

checkout (Checkout!)

The checkout to which the payment belongs.

creditCard (CreditCard)

The credit card used for the payment in the case of direct payments.

errorMessage (String)

A message describing a processing error during asynchronous processing.

id (ID!)

Globally unique identifier.

idempotencyKey (String)

A client-side generated token to identify a payment and perform idempotent operations. +For more information, refer to +Idempotent requests.

nextActionUrl (URL)

The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow.

ready (Boolean!)

Whether or not the payment is still processing asynchronously.

test (Boolean!)

A flag to indicate if the payment is to be done in test mode for gateways that support it.

transaction (Transaction)

The actual transaction recorded by Shopify after having processed the payment with the gateway.

+ +--- + +### PaymentSettings + +

Settings related to payments.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
acceptedCardBrands ([CardBrand!]!)

List of the card brands which the shop accepts.

cardVaultUrl (URL!)

The url pointing to the endpoint to vault credit cards.

countryCode (CountryCode!)

The country where the shop is located.

currencyCode (CurrencyCode!)

The three-letter code for the shop’s primary currency.

enabledPresentmentCurrencies ([CurrencyCode!]!)

A list of enabled currencies (ISO 4217 format) that the shop accepts. +Merchants can enable currencies from their Shopify Payments settings in the Shopify admin.

shopifyPaymentsAccountId (String)

The shop’s Shopify Payments account id.

supportedDigitalWallets ([DigitalWallet!]!)

List of the digital wallets which the shop supports.

+ +--- + +### PricingPercentageValue + +

The value of the percentage pricing object.

+ +#### Fields + + + + + + + + + + +
NameDescription
percentage (Float!)

The percentage value of the object.

+ +--- + +### Product + +

A product represents an individual item for sale in a Shopify store. Products are often physical, but they don’t have to be. +For example, a digital download (such as a movie, music or ebook file) also +qualifies as a product, as do services (such as equipment rental, work for hire, +customization of another product or an extended warranty).

+ +#### Implements + + +- [HasMetafields](interfaces.md#hasmetafields) +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
availableForSale (Boolean!)

Indicates if at least one product variant is available for sale.

collections (CollectionConnection!) +

List of collections a product belongs to.

+ + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
compareAtPriceRange (ProductPriceRange!)

The compare at price of the product across all variants.

createdAt (DateTime!)

The date and time when the product was created.

description (String!) +

Stripped description of the product, single line with HTML tags removed.

+ + + + + + + +
Arguments
+

truncateAt (Int)

+

Truncates string after the given length.

+
+
descriptionHtml (HTML!)

The description of the product, complete with HTML formatting.

handle (String!)

A human-friendly unique string for the Product automatically generated from its title. +They are used by the Liquid templating language to refer to objects.

id (ID!)

Globally unique identifier.

images (ImageConnection!) +

List of images associated with the product.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (ProductImageSortKeys)

+

Sort the underlying list by the given key.

+
+

maxWidth (Int)

+

Image width in pixels between 1 and 2048. This argument is deprecated: Use maxWidth on Image.transformedSrc instead.

+
+

maxHeight (Int)

+

Image height in pixels between 1 and 2048. This argument is deprecated: Use +maxHeight on Image.transformedSrc instead.

+
+

crop (CropRegion)

+

Crops the image according to the specified region. This argument is +deprecated: Use crop on Image.transformedSrc instead.

+
+

scale (Int)

+

Image size multiplier for high-resolution retina displays. Must be between 1 +and 3. This argument is deprecated: Use scale on Image.transformedSrc instead.

+
+
media (MediaConnection!) +

The media associated with the product.

+ + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (ProductMediaSortKeys)

+

Sort the underlying list by the given key.

+
+
metafield (Metafield) +

The metafield associated with the resource.

+ + + + + + + + + + +
Arguments
+

namespace (String!)

+

Container for a set of metafields (maximum of 20 characters).

+
+

key (String!)

+

Identifier for the metafield (maximum of 30 characters).

+
+
metafields (MetafieldConnection!) +

A paginated list of metafields associated with the resource.

+ + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

namespace (String)

+

Container for a set of metafields (maximum of 20 characters).

+
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
onlineStoreUrl (URL)

The online store URL for the product. +A value of null indicates that the product is not published to the Online Store sales channel.

options ([ProductOption!]!) +

List of product options.

+ + + + + + + +
Arguments
+

first (Int)

+

Truncate the array result to this size.

+
+
presentmentPriceRanges (ProductPriceRangeConnection!) +

List of price ranges in the presentment currencies for this shop.

+ + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

presentmentCurrencies ([CurrencyCode!])

+

Specifies the presentment currencies to return a price range in.

+
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
priceRange (ProductPriceRange!)

The price range.

productType (String!)

A categorization that a product can be tagged with, commonly used for filtering and searching.

publishedAt (DateTime!)

The date and time when the product was published to the channel.

seo (SEO!)

The product’s SEO information.

tags ([String!]!)

A comma separated list of tags that have been added to the product. +Additional access scope required for private apps: unauthenticated_read_product_tags.

title (String!)

The product’s title.

totalInventory (Int)

The total quantity of inventory in stock for this Product.

updatedAt (DateTime!)

The date and time when the product was last modified. +A product’s updatedAt value can change for different reasons. For example, if an order +is placed for a product that has inventory tracking set up, then the inventory adjustment +is counted as an update.

variantBySelectedOptions (ProductVariant) +

Find a product’s variant based on its selected options. +This is useful for converting a user’s selection of product options into a single matching variant. +If there is not a variant for the selected options, null will be returned.

+ + + + + + + +
Arguments
+

selectedOptions ([SelectedOptionInput!]!)

+

The input fields used for a selected option.

+
+
variants (ProductVariantConnection!) +

List of the product’s variants.

+ + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (ProductVariantSortKeys)

+

Sort the underlying list by the given key.

+
+
vendor (String!)

The product’s vendor name.

+ +--- + +### ProductConnection + +

An auto-generated type for paginating through multiple Products.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([ProductEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### ProductEdge + +

An auto-generated type which holds one Product and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (Product!)

The item at the end of ProductEdge.

+ +--- + +### ProductOption + +

Product property names like “Size”, “Color”, and “Material” that the customers can select. +Variants are selected based on permutations of these options. +255 characters limit each.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + +
NameDescription
id (ID!)

Globally unique identifier.

name (String!)

The product option’s name.

values ([String!]!)

The corresponding value to the product option name.

+ +--- + +### ProductPriceRange + +

The price range of the product.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
maxVariantPrice (MoneyV2!)

The highest variant’s price.

minVariantPrice (MoneyV2!)

The lowest variant’s price.

+ +--- + +### ProductPriceRangeConnection + +

An auto-generated type for paginating through multiple ProductPriceRanges.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([ProductPriceRangeEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### ProductPriceRangeEdge + +

An auto-generated type which holds one ProductPriceRange and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (ProductPriceRange!)

The item at the end of ProductPriceRangeEdge.

+ +--- + +### ProductVariant + +

A product variant represents a different version of a product, such as differing sizes or differing colors.

+ +#### Implements + + +- [HasMetafields](interfaces.md#hasmetafields) +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
available (Boolean)

Indicates if the product variant is in stock.

availableForSale (Boolean!)

Indicates if the product variant is available for sale.

compareAtPrice (Money)

The compare at price of the variant. This can be used to mark a variant as on +sale, when compareAtPrice is higher than price.

compareAtPriceV2 (MoneyV2)

The compare at price of the variant. This can be used to mark a variant as on +sale, when compareAtPriceV2 is higher than priceV2.

currentlyNotInStock (Boolean!)

Whether a product is out of stock but still available for purchase (used for backorders).

id (ID!)

Globally unique identifier.

image (Image) +

Image associated with the product variant. This field falls back to the product image if no image is available.

+ + + + + + + + + + + + + + + + +
Arguments
+

maxWidth (Int)

+

Image width in pixels between 1 and 2048. This argument is deprecated: Use maxWidth on Image.transformedSrc instead.

+
+

maxHeight (Int)

+

Image height in pixels between 1 and 2048. This argument is deprecated: Use +maxHeight on Image.transformedSrc instead.

+
+

crop (CropRegion)

+

Crops the image according to the specified region. This argument is +deprecated: Use crop on Image.transformedSrc instead.

+
+

scale (Int)

+

Image size multiplier for high-resolution retina displays. Must be between 1 +and 3. This argument is deprecated: Use scale on Image.transformedSrc instead.

+
+
metafield (Metafield) +

The metafield associated with the resource.

+ + + + + + + + + + +
Arguments
+

namespace (String!)

+

Container for a set of metafields (maximum of 20 characters).

+
+

key (String!)

+

Identifier for the metafield (maximum of 30 characters).

+
+
metafields (MetafieldConnection!) +

A paginated list of metafields associated with the resource.

+ + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

namespace (String)

+

Container for a set of metafields (maximum of 20 characters).

+
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
presentmentPrices (ProductVariantPricePairConnection!) +

List of prices and compare-at prices in the presentment currencies for this shop.

+ + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

presentmentCurrencies ([CurrencyCode!])

+

The presentment currencies prices should return in.

+
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
presentmentUnitPrices (MoneyV2Connection!) +

List of unit prices in the presentment currencies for this shop.

+ + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

presentmentCurrencies ([CurrencyCode!])

+

Specify the currencies in which to return presentment unit prices.

+
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+
price (Money!)

The product variant’s price.

priceV2 (MoneyV2!)

The product variant’s price.

product (Product!)

The product object that the product variant belongs to.

quantityAvailable (Int)

The total sellable quantity of the variant for online sales channels.

requiresShipping (Boolean!)

Whether a customer needs to provide a shipping address when placing an order for the product variant.

selectedOptions ([SelectedOption!]!)

List of product options applied to the variant.

sku (String)

The SKU (stock keeping unit) associated with the variant.

title (String!)

The product variant’s title.

unitPrice (MoneyV2)

The unit price value for the variant based on the variant’s measurement.

unitPriceMeasurement (UnitPriceMeasurement)

The unit price measurement for the variant.

weight (Float)

The weight of the product variant in the unit system specified with weight_unit.

weightUnit (WeightUnit!)

Unit of measurement for weight.

+ +--- + +### ProductVariantConnection + +

An auto-generated type for paginating through multiple ProductVariants.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([ProductVariantEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### ProductVariantEdge + +

An auto-generated type which holds one ProductVariant and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (ProductVariant!)

The item at the end of ProductVariantEdge.

+ +--- + +### ProductVariantPricePair + +

The compare-at price and price of a variant sharing a currency.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
compareAtPrice (MoneyV2)

The compare-at price of the variant with associated currency.

price (MoneyV2!)

The price of the variant with associated currency.

+ +--- + +### ProductVariantPricePairConnection + +

An auto-generated type for paginating through multiple ProductVariantPricePairs.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([ProductVariantPricePairEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### ProductVariantPricePairEdge + +

An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (ProductVariantPricePair!)

The item at the end of ProductVariantPricePairEdge.

+ +--- + +### QueryRoot + +

The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
articles (ArticleConnection!) +

List of the shop’s articles.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (ArticleSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - author + - blog_title + - created_at + - tag + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

+
+
blogByHandle (Blog) +

Find a blog by its handle.

+ + + + + + + +
Arguments
+

handle (String!)

+

The handle of the blog.

+
+
blogs (BlogConnection!) +

List of the shop’s blogs.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (BlogSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - created_at + - handle + - title + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

+
+
collectionByHandle (Collection) +

Find a collection by its handle.

+ + + + + + + +
Arguments
+

handle (String!)

+

The handle of the collection.

+
+
collections (CollectionConnection!) +

List of the shop’s collections.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (CollectionSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - collection_type + - title + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

+
+
customer (Customer) +

Find a customer by its access token.

+ + + + + + + +
Arguments
+

customerAccessToken (String!)

+

The customer access token.

+
+
node (Node) +

Returns a specific node by ID.

+ + + + + + + +
Arguments
+

id (ID!)

+

The ID of the Node to return.

+
+
nodes ([Node]!) +

Returns the list of nodes with the given IDs.

+ + + + + + + +
Arguments
+

ids ([ID!]!)

+

The IDs of the Nodes to return.

+
+
pageByHandle (Page) +

Find a page by its handle.

+ + + + + + + +
Arguments
+

handle (String!)

+

The handle of the page.

+
+
pages (PageConnection!) +

List of the shop’s pages.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (PageSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - created_at + - handle + - title + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

+
+
productByHandle (Product) +

Find a product by its handle.

+ + + + + + + +
Arguments
+

handle (String!)

+

The handle of the product.

+
+
productRecommendations ([Product!]) +

Find recommended products related to a given product_id. +To learn more about how recommendations are generated, see +Showing product recommendations on product pages.

+ + + + + + + +
Arguments
+

productId (ID!)

+

The id of the product.

+
+
productTags (StringConnection!) +

Tags added to products. +Additional access scope required: unauthenticated_read_product_tags.

+ + + + + + + +
Arguments
+

first (Int!)

+

Returns up to the first n elements from the list.

+
+
productTypes (StringConnection!) +

List of product types for the shop’s products that are published to your app.

+ + + + + + + +
Arguments
+

first (Int!)

+

Returns up to the first n elements from the list.

+
+
products (ProductConnection!) +

List of the shop’s products.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (ProductSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - available_for_sale + - created_at + - product_type + - tag + - title + - updated_at + - variants.price + - vendor

+ +

See the detailed search syntax +for more information about using filters.

+
+
publicApiVersions ([ApiVersion!]!)

The list of public Storefront API versions, including supported, release candidate and unstable versions.

shop (Shop!)

The shop associated with the storefront access token.

+ +--- + +### SEO + +

SEO information.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
description (String)

The meta description.

title (String)

The SEO title.

+ +--- + +### ScriptDiscountApplication + +

Script discount applications capture the intentions of a discount that +was created by a Shopify Script.

+ +#### Implements + + +- [DiscountApplication](interfaces.md#discountapplication) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
allocationMethod (DiscountApplicationAllocationMethod!)

The method by which the discount’s value is allocated to its entitled items.

description (String!)

The description of the application as defined by the Script.

targetSelection (DiscountApplicationTargetSelection!)

Which lines of targetType that the discount is allocated over.

targetType (DiscountApplicationTargetType!)

The type of line that the discount is applicable towards.

title (String!)

The title of the application as defined by the Script.

value (PricingValue!)

The value of the discount application.

+ +--- + +### SelectedOption + +

Properties used by customers to select a product variant. +Products can have multiple options, like different sizes or colors.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
name (String!)

The product option’s name.

value (String!)

The product option’s value.

+ +--- + +### ShippingRate + +

A shipping rate to be applied to a checkout.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
handle (String!)

Human-readable unique identifier for this shipping rate.

price (Money!)

Price of this shipping rate.

priceV2 (MoneyV2!)

Price of this shipping rate.

title (String!)

Title of this shipping rate.

+ +--- + +### Shop + +

Shop represents a collection of the general settings and information about the shop.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
articles (ArticleConnection!) +

List of the shop’ articles.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (ArticleSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - author + - blog_title + - created_at + - tag + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

+
+
blogs (BlogConnection!) +

List of the shop’ blogs.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (BlogSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - created_at + - handle + - title + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

+
+
collectionByHandle (Collection) +

Find a collection by its handle.

+ + + + + + + +
Arguments
+

handle (String!)

+

The handle of the collection.

+
+
collections (CollectionConnection!) +

List of the shop’s collections.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (CollectionSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - collection_type + - title + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

+
+
currencyCode (CurrencyCode!)

The three-letter code for the currency that the shop accepts.

description (String)

A description of the shop.

moneyFormat (String!)

A string representing the way currency is formatted when the currency isn’t specified.

name (String!)

The shop’s name.

paymentSettings (PaymentSettings!)

Settings related to payments.

primaryDomain (Domain!)

The shop’s primary domain.

privacyPolicy (ShopPolicy)

The shop’s privacy policy.

productByHandle (Product) +

Find a product by its handle.

+ + + + + + + +
Arguments
+

handle (String!)

+

The handle of the product.

+
+
productTags (StringConnection!) +

A list of tags that have been added to products. +Additional access scope required: unauthenticated_read_product_tags.

+ + + + + + + +
Arguments
+

first (Int!)

+

Returns up to the first n elements from the list.

+
+
productTypes (StringConnection!) +

List of the shop’s product types.

+ + + + + + + +
Arguments
+

first (Int!)

+

Returns up to the first n elements from the list.

+
+
products (ProductConnection!) +

List of the shop’s products.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Arguments
+

first (Int)

+

Returns up to the first n elements from the list.

+
+

after (String)

+

Returns the elements that come after the specified cursor.

+
+

last (Int)

+

Returns up to the last n elements from the list.

+
+

before (String)

+

Returns the elements that come before the specified cursor.

+
+

reverse (Boolean)

+

Reverse the order of the underlying list.

+
+

sortKey (ProductSortKeys)

+

Sort the underlying list by the given key.

+
+

query (String)

+

Supported filter parameters: + - available_for_sale + - created_at + - product_type + - tag + - title + - updated_at + - variants.price + - vendor

+ +

See the detailed search syntax +for more information about using filters.

+
+
refundPolicy (ShopPolicy)

The shop’s refund policy.

shippingPolicy (ShopPolicy)

The shop’s shipping policy.

shipsToCountries ([CountryCode!]!)

Countries that the shop ships to.

shopifyPaymentsAccountId (String)

The shop’s Shopify Payments account id.

termsOfService (ShopPolicy)

The shop’s terms of service.

+ +--- + +### ShopPolicy + +

Policy that a merchant has configured for their store, such as their refund or privacy policy.

+ +#### Implements + + +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
body (String!)

Policy text, maximum size of 64kb.

handle (String!)

Policy’s handle.

id (ID!)

Globally unique identifier.

title (String!)

Policy’s title.

url (URL!)

Public URL to the policy.

+ +--- + +### StringConnection + +

An auto-generated type for paginating through multiple Strings.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
edges ([StringEdge!]!)

A list of edges.

pageInfo (PageInfo!)

Information to aid in pagination.

+ +--- + +### StringEdge + +

An auto-generated type which holds one String and a cursor during pagination.

+ +#### Fields + + + + + + + + + + + + + + +
NameDescription
cursor (String!)

A cursor for use in pagination.

node (String!)

The item at the end of StringEdge.

+ +--- + +### Transaction + +

An object representing exchange of money for a product or service.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
amount (Money!)

The amount of money that the transaction was for.

amountV2 (MoneyV2!)

The amount of money that the transaction was for.

kind (TransactionKind!)

The kind of the transaction.

status (TransactionStatus!)

The status of the transaction.

statusV2 (TransactionStatus)

The status of the transaction.

test (Boolean!)

Whether the transaction was done in test mode or not.

+ +--- + +### UnitPriceMeasurement + +

The measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml).

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
measuredType (UnitPriceMeasurementMeasuredType)

The type of unit of measurement for the unit price measurement.

quantityUnit (UnitPriceMeasurementMeasuredUnit)

The quantity unit for the unit price measurement.

quantityValue (Float!)

The quantity value for the unit price measurement.

referenceUnit (UnitPriceMeasurementMeasuredUnit)

The reference unit for the unit price measurement.

referenceValue (Int!)

The reference value for the unit price measurement.

+ +--- + +### UserError + +

Represents an error in the input of a mutation.

+ +#### Implements + + +- [DisplayableError](interfaces.md#displayableerror) + +#### Fields + + + + + + + + + + + + + + +
NameDescription
field ([String!])

Path to the input field which caused the error.

message (String!)

The error message.

+ +--- + +### Video + +

Represents a Shopify hosted video.

+ +#### Implements + + +- [Media](interfaces.md#media) +- [Node](interfaces.md#node) + +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
alt (String)

A word or phrase to share the nature or contents of a media.

id (ID!)

Globally unique identifier.

mediaContentType (MediaContentType!)

The media content type.

previewImage (Image)

The preview image for the media.

sources ([VideoSource!]!)

The sources for a video.

+ +--- + +### VideoSource + +

Represents a source for a Shopify hosted video.

+ +#### Fields + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
format (String!)

The format of the video source.

height (Int!)

The height of the video.

mimeType (String!)

The video MIME type.

url (String!)

The URL of the video.

width (Int!)

The width of the video.

+ +--- \ No newline at end of file diff --git a/example/shopify/queries.md b/example/shopify/queries.md new file mode 100644 index 0000000000000..a7ed4f4c9c084 --- /dev/null +++ b/example/shopify/queries.md @@ -0,0 +1,303 @@ +# Queries + +### About queries + +The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. + +### articles + +#### Type: [ArticleConnection!](objects.md#articleconnection) + +List of the shop's articles. + +#### Arguments + +| Name | Description | +|------|-------------| +| first ([Int](scalars.md#int)) |

Returns up to the first n elements from the list.

| +| after ([String](scalars.md#string)) |

Returns the elements that come after the specified cursor.

| +| last ([Int](scalars.md#int)) |

Returns up to the last n elements from the list.

| +| before ([String](scalars.md#string)) |

Returns the elements that come before the specified cursor.

| +| reverse ([Boolean](scalars.md#boolean)) |

Reverse the order of the underlying list.

| +| sortKey ([ArticleSortKeys](enums.md#articlesortkeys)) |

Sort the underlying list by the given key.

| +| query ([String](scalars.md#string)) |

Supported filter parameters: + - author + - blog_title + - created_at + - tag + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

| + +--- + +### blogByHandle + +#### Type: [Blog](objects.md#blog) + +Find a blog by its handle. + +#### Arguments + +| Name | Description | +|------|-------------| +| handle ([String!](scalars.md#string)) |

The handle of the blog.

| + +--- + +### blogs + +#### Type: [BlogConnection!](objects.md#blogconnection) + +List of the shop's blogs. + +#### Arguments + +| Name | Description | +|------|-------------| +| first ([Int](scalars.md#int)) |

Returns up to the first n elements from the list.

| +| after ([String](scalars.md#string)) |

Returns the elements that come after the specified cursor.

| +| last ([Int](scalars.md#int)) |

Returns up to the last n elements from the list.

| +| before ([String](scalars.md#string)) |

Returns the elements that come before the specified cursor.

| +| reverse ([Boolean](scalars.md#boolean)) |

Reverse the order of the underlying list.

| +| sortKey ([BlogSortKeys](enums.md#blogsortkeys)) |

Sort the underlying list by the given key.

| +| query ([String](scalars.md#string)) |

Supported filter parameters: + - created_at + - handle + - title + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

| + +--- + +### collectionByHandle + +#### Type: [Collection](objects.md#collection) + +Find a collection by its handle. + +#### Arguments + +| Name | Description | +|------|-------------| +| handle ([String!](scalars.md#string)) |

The handle of the collection.

| + +--- + +### collections + +#### Type: [CollectionConnection!](objects.md#collectionconnection) + +List of the shop’s collections. + +#### Arguments + +| Name | Description | +|------|-------------| +| first ([Int](scalars.md#int)) |

Returns up to the first n elements from the list.

| +| after ([String](scalars.md#string)) |

Returns the elements that come after the specified cursor.

| +| last ([Int](scalars.md#int)) |

Returns up to the last n elements from the list.

| +| before ([String](scalars.md#string)) |

Returns the elements that come before the specified cursor.

| +| reverse ([Boolean](scalars.md#boolean)) |

Reverse the order of the underlying list.

| +| sortKey ([CollectionSortKeys](enums.md#collectionsortkeys)) |

Sort the underlying list by the given key.

| +| query ([String](scalars.md#string)) |

Supported filter parameters: + - collection_type + - title + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

| + +--- + +### customer + +#### Type: [Customer](objects.md#customer) + +Find a customer by its access token. + +#### Arguments + +| Name | Description | +|------|-------------| +| customerAccessToken ([String!](scalars.md#string)) |

The customer access token.

| + +--- + +### node + +#### Type: [Node](interfaces.md#node) + +Returns a specific node by ID. + +#### Arguments + +| Name | Description | +|------|-------------| +| id ([ID!](scalars.md#id)) |

The ID of the Node to return.

| + +--- + +### nodes + +#### Type: [[Node]!](interfaces.md#node) + +Returns the list of nodes with the given IDs. + +#### Arguments + +| Name | Description | +|------|-------------| +| ids ([[ID!]!](scalars.md#id)) |

The IDs of the Nodes to return.

| + +--- + +### pageByHandle + +#### Type: [Page](objects.md#page) + +Find a page by its handle. + +#### Arguments + +| Name | Description | +|------|-------------| +| handle ([String!](scalars.md#string)) |

The handle of the page.

| + +--- + +### pages + +#### Type: [PageConnection!](objects.md#pageconnection) + +List of the shop's pages. + +#### Arguments + +| Name | Description | +|------|-------------| +| first ([Int](scalars.md#int)) |

Returns up to the first n elements from the list.

| +| after ([String](scalars.md#string)) |

Returns the elements that come after the specified cursor.

| +| last ([Int](scalars.md#int)) |

Returns up to the last n elements from the list.

| +| before ([String](scalars.md#string)) |

Returns the elements that come before the specified cursor.

| +| reverse ([Boolean](scalars.md#boolean)) |

Reverse the order of the underlying list.

| +| sortKey ([PageSortKeys](enums.md#pagesortkeys)) |

Sort the underlying list by the given key.

| +| query ([String](scalars.md#string)) |

Supported filter parameters: + - created_at + - handle + - title + - updated_at

+ +

See the detailed search syntax +for more information about using filters.

| + +--- + +### productByHandle + +#### Type: [Product](objects.md#product) + +Find a product by its handle. + +#### Arguments + +| Name | Description | +|------|-------------| +| handle ([String!](scalars.md#string)) |

The handle of the product.

| + +--- + +### productRecommendations + +#### Type: [[Product!]](objects.md#product) + +Find recommended products related to a given `product_id`. +To learn more about how recommendations are generated, see +[*Showing product recommendations on product pages*](https://help.shopify.com/themes/development/recommended-products). + +#### Arguments + +| Name | Description | +|------|-------------| +| productId ([ID!](scalars.md#id)) |

The id of the product.

| + +--- + +### productTags + +#### Type: [StringConnection!](objects.md#stringconnection) + +Tags added to products. +Additional access scope required: unauthenticated_read_product_tags. + +#### Arguments + +| Name | Description | +|------|-------------| +| first ([Int!](scalars.md#int)) |

Returns up to the first n elements from the list.

| + +--- + +### productTypes + +#### Type: [StringConnection!](objects.md#stringconnection) + +List of product types for the shop's products that are published to your app. + +#### Arguments + +| Name | Description | +|------|-------------| +| first ([Int!](scalars.md#int)) |

Returns up to the first n elements from the list.

| + +--- + +### products + +#### Type: [ProductConnection!](objects.md#productconnection) + +List of the shop’s products. + +#### Arguments + +| Name | Description | +|------|-------------| +| first ([Int](scalars.md#int)) |

Returns up to the first n elements from the list.

| +| after ([String](scalars.md#string)) |

Returns the elements that come after the specified cursor.

| +| last ([Int](scalars.md#int)) |

Returns up to the last n elements from the list.

| +| before ([String](scalars.md#string)) |

Returns the elements that come before the specified cursor.

| +| reverse ([Boolean](scalars.md#boolean)) |

Reverse the order of the underlying list.

| +| sortKey ([ProductSortKeys](enums.md#productsortkeys)) |

Sort the underlying list by the given key.

| +| query ([String](scalars.md#string)) |

Supported filter parameters: + - available_for_sale + - created_at + - product_type + - tag + - title + - updated_at + - variants.price + - vendor

+ +

See the detailed search syntax +for more information about using filters.

| + +--- + +### publicApiVersions + +#### Type: [[ApiVersion!]!](objects.md#apiversion) + +The list of public Storefront API versions, including supported, release candidate and unstable versions. + +--- + +### shop + +#### Type: [Shop!](objects.md#shop) + +The shop associated with the storefront access token. + +--- \ No newline at end of file diff --git a/example/shopify/scalars.md b/example/shopify/scalars.md new file mode 100644 index 0000000000000..362e543c4daa2 --- /dev/null +++ b/example/shopify/scalars.md @@ -0,0 +1,69 @@ +# Scalars + +### About scalars + +[Scalars](https://graphql.github.io/graphql-spec/June2018/#sec-Scalars) are primitive values: `Int`, `Float`, `String`, `Boolean`, or `ID`. + +When calling the GraphQL API, you must specify nested subfields until you return only scalars. + +### Boolean + +

The Boolean scalar type represents true or false.

+ +--- + +### DateTime + +

An ISO-8601 encoded UTC date time string. Example value: "2019-07-03T20:47:55Z".

+ +--- + +### Decimal + +

A signed decimal number, which supports arbitrary precision and is serialized as a string. Example value: "29.99".

+ +--- + +### Float + +

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

+ +--- + +### HTML + +

A string containing HTML code. Example value: "<p>Grey cotton knit sweater.</p>".

+ +--- + +### ID + +

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as “4”) or integer (such as 4) input value will be accepted as an ID.

+ +--- + +### Int + +

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

+ +--- + +### Money + +

A monetary value string. Example value: "100.57".

+ +--- + +### String + +

The Stringscalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

+ +--- + +### URL + +

An RFC 3986 and RFC 3987 compliant URI string.

+ +

Example value: "https://johns-apparel.myshopify.com".

+ +--- \ No newline at end of file diff --git a/example/shopify/schema.graphql b/example/shopify/schema.graphql new file mode 100644 index 0000000000000..c03df2261a514 --- /dev/null +++ b/example/shopify/schema.graphql @@ -0,0 +1,6573 @@ +schema { + query: QueryRoot + mutation: Mutation +} + +"""Marks an element of a GraphQL schema as having restricted access.""" +directive @accessRestricted( + """Explains the reason around this restriction""" + reason: String = null +) on FIELD_DEFINITION | OBJECT + +"""A version of the API.""" +type ApiVersion { + """The human-readable name of the version.""" + displayName: String! + + """ + The unique identifier of an ApiVersion. All supported API versions have a date-based (YYYY-MM) or `unstable` handle. + """ + handle: String! + + """Whether the version is supported by Shopify.""" + supported: Boolean! +} + +"""Details about the gift card used on the checkout.""" +type AppliedGiftCard implements Node { + """The amount that was taken from the gift card by applying it.""" + amountUsed: Money! @deprecated(reason: "Use `amountUsedV2` instead") + + """The amount that was taken from the gift card by applying it.""" + amountUsedV2: MoneyV2! + + """The amount left on the gift card.""" + balance: Money! @deprecated(reason: "Use `balanceV2` instead") + + """The amount left on the gift card.""" + balanceV2: MoneyV2! + + """Globally unique identifier.""" + id: ID! + + """The last characters of the gift card.""" + lastCharacters: String! + + """The amount that was applied to the checkout in its currency.""" + presentmentAmountUsed: MoneyV2! +} + +"""An article in an online store blog.""" +type Article implements Node { + """The article's author.""" + author: ArticleAuthor! @deprecated(reason: "Use `authorV2` instead") + + """The article's author.""" + authorV2: ArticleAuthor + + """The blog that the article belongs to.""" + blog: Blog! + + """List of comments posted on the article.""" + comments( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CommentConnection! + + """Stripped content of the article, single line with HTML tags removed.""" + content( + """Truncates string after the given length.""" + truncateAt: Int + ): String! + + """The content of the article, complete with HTML formatting.""" + contentHtml: HTML! + + """Stripped excerpt of the article, single line with HTML tags removed.""" + excerpt( + """Truncates string after the given length.""" + truncateAt: Int + ): String + + """The excerpt of the article, complete with HTML formatting.""" + excerptHtml: HTML + + """ + A human-friendly unique string for the Article automatically generated from its title. + + """ + handle: String! + + """Globally unique identifier.""" + id: ID! + + """The image associated with the article.""" + image( + """ + Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. + """ + maxWidth: Int + + """ + Image height in pixels between 1 and 2048. This argument is deprecated: Use + `maxHeight` on `Image.transformedSrc` instead. + """ + maxHeight: Int + + """ + Crops the image according to the specified region. This argument is + deprecated: Use `crop` on `Image.transformedSrc` instead. + """ + crop: CropRegion + + """ + Image size multiplier for high-resolution retina displays. Must be between 1 + and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. + """ + scale: Int = 1 + ): Image + + """The date and time when the article was published.""" + publishedAt: DateTime! + + """The article’s SEO information.""" + seo: SEO + + """A categorization that a article can be tagged with.""" + tags: [String!]! + + """The article’s name.""" + title: String! + + """The url pointing to the article accessible from the web.""" + url: URL! +} + +"""The author of an article.""" +type ArticleAuthor { + """The author's bio.""" + bio: String + + """The author’s email.""" + email: String! + + """The author's first name.""" + firstName: String! + + """The author's last name.""" + lastName: String! + + """The author's full name.""" + name: String! +} + +""" +An auto-generated type for paginating through multiple Articles. + +""" +type ArticleConnection { + """A list of edges.""" + edges: [ArticleEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Article and a cursor during pagination. + +""" +type ArticleEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of ArticleEdge.""" + node: Article! +} + +"""The set of valid sort keys for the Article query.""" +enum ArticleSortKeys { + """Sort by the `title` value.""" + TITLE + + """Sort by the `blog_title` value.""" + BLOG_TITLE + + """Sort by the `author` value.""" + AUTHOR + + """Sort by the `updated_at` value.""" + UPDATED_AT + + """Sort by the `published_at` value.""" + PUBLISHED_AT + + """Sort by the `id` value.""" + ID + + """ + During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the + results by relevance to the search term(s). When no search query is specified, this sort key is not + deterministic and should not be used. + + """ + RELEVANCE +} + +"""Represents a generic custom attribute.""" +type Attribute { + """Key or name of the attribute.""" + key: String! + + """Value of the attribute.""" + value: String +} + +"""Specifies the input fields required for an attribute.""" +input AttributeInput { + """Key or name of the attribute.""" + key: String! + + """Value of the attribute.""" + value: String! +} + +""" +Automatic discount applications capture the intentions of a discount that was automatically applied. + +""" +type AutomaticDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """Which lines of targetType that the discount is allocated over.""" + targetSelection: DiscountApplicationTargetSelection! + + """The type of line that the discount is applicable towards.""" + targetType: DiscountApplicationTargetType! + + """The title of the application.""" + title: String! + + """The value of the discount application.""" + value: PricingValue! +} + +"""A collection of available shipping rates for a checkout.""" +type AvailableShippingRates { + """ + Whether or not the shipping rates are ready. + The `shippingRates` field is `null` when this value is `false`. + This field should be polled until its value becomes `true`. + + """ + ready: Boolean! + + """The fetched shipping rates. `null` until the `ready` field is `true`.""" + shippingRates: [ShippingRate!] +} + +"""An online store blog.""" +type Blog implements Node { + """Find an article by its handle.""" + articleByHandle( + """The handle of the article.""" + handle: String! + ): Article + + """List of the blog's articles.""" + articles( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: ArticleSortKeys = ID + + """ + Supported filter parameters: + - `author` + - `blog_title` + - `created_at` + - `tag` + - `updated_at` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): ArticleConnection! + + """The authors who have contributed to the blog.""" + authors: [ArticleAuthor!]! + + """ + A human-friendly unique string for the Blog automatically generated from its title. + + """ + handle: String! + + """Globally unique identifier.""" + id: ID! + + """The blog's SEO information.""" + seo: SEO + + """The blogs’s title.""" + title: String! + + """The url pointing to the blog accessible from the web.""" + url: URL! +} + +""" +An auto-generated type for paginating through multiple Blogs. + +""" +type BlogConnection { + """A list of edges.""" + edges: [BlogEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Blog and a cursor during pagination. + +""" +type BlogEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of BlogEdge.""" + node: Blog! +} + +"""The set of valid sort keys for the Blog query.""" +enum BlogSortKeys { + """Sort by the `handle` value.""" + HANDLE + + """Sort by the `title` value.""" + TITLE + + """Sort by the `id` value.""" + ID + + """ + During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the + results by relevance to the search term(s). When no search query is specified, this sort key is not + deterministic and should not be used. + + """ + RELEVANCE +} + +""" +Card brand, such as Visa or Mastercard, which can be used for payments. +""" +enum CardBrand { + """Visa.""" + VISA + + """Mastercard.""" + MASTERCARD + + """Discover.""" + DISCOVER + + """American Express.""" + AMERICAN_EXPRESS + + """Diners Club.""" + DINERS_CLUB + + """JCB.""" + JCB +} + +""" +A container for all the information required to checkout items and pay. +""" +type Checkout implements Node { + """The gift cards used on the checkout.""" + appliedGiftCards: [AppliedGiftCard!]! + + """ + The available shipping rates for this Checkout. + Should only be used when checkout `requiresShipping` is `true` and + the shipping address is valid. + + """ + availableShippingRates: AvailableShippingRates + + """The date and time when the checkout was completed.""" + completedAt: DateTime + + """The date and time when the checkout was created.""" + createdAt: DateTime! + + """The currency code for the Checkout.""" + currencyCode: CurrencyCode! + + """A list of extra information that is added to the checkout.""" + customAttributes: [Attribute!]! + + """The customer associated with the checkout.""" + customer: Customer @deprecated(reason: "This field will always return null. If you have an authentication token for the customer, you can use the `customer` field on the query root to retrieve it.") + + """Discounts that have been applied on the checkout.""" + discountApplications( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): DiscountApplicationConnection! + + """The email attached to this checkout.""" + email: String + + """Globally unique identifier.""" + id: ID! + + """ + A list of line item objects, each one containing information about an item in the checkout. + """ + lineItems( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CheckoutLineItemConnection! + + """ + The sum of all the prices of all the items in the checkout. Duties, taxes, shipping and discounts excluded. + """ + lineItemsSubtotalPrice: MoneyV2! + + """The note associated with the checkout.""" + note: String + + """The resulting order from a paid checkout.""" + order: Order + + """ + The Order Status Page for this Checkout, null when checkout is not completed. + """ + orderStatusUrl: URL + + """ + The amount left to be paid. This is equal to the cost of the line items, taxes + and shipping minus discounts and gift cards. + """ + paymentDue: Money! @deprecated(reason: "Use `paymentDueV2` instead") + + """ + The amount left to be paid. This is equal to the cost of the line items, + duties, taxes and shipping minus discounts and gift cards. + """ + paymentDueV2: MoneyV2! + + """ + Whether or not the Checkout is ready and can be completed. Checkouts may + have asynchronous operations that can take time to finish. If you want + to complete a checkout or ensure all the fields are populated and up to + date, polling is required until the value is true. + + """ + ready: Boolean! + + """States whether or not the fulfillment requires shipping.""" + requiresShipping: Boolean! + + """The shipping address to where the line items will be shipped.""" + shippingAddress: MailingAddress + + """ + The discounts that have been allocated onto the shipping line by discount applications. + + """ + shippingDiscountAllocations: [DiscountAllocation!]! + + """ + Once a shipping rate is selected by the customer it is transitioned to a `shipping_line` object. + """ + shippingLine: ShippingRate + + """Price of the checkout before shipping and taxes.""" + subtotalPrice: Money! @deprecated(reason: "Use `subtotalPriceV2` instead") + + """Price of the checkout before duties, shipping and taxes.""" + subtotalPriceV2: MoneyV2! + + """ + Specifies if taxes are included in the line item and shipping line prices. + """ + taxesIncluded: Boolean! + + """Specifies if the Checkout is tax exempt.""" + taxExempt: Boolean! + + """The sum of all the duties applied to the line items in the checkout.""" + totalDuties: MoneyV2 + + """ + The sum of all the prices of all the items in the checkout, taxes and discounts included. + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceV2` instead") + + """ + The sum of all the prices of all the items in the checkout, duties, taxes and discounts included. + """ + totalPriceV2: MoneyV2! + + """ + The sum of all the taxes applied to the line items and shipping lines in the checkout. + """ + totalTax: Money! @deprecated(reason: "Use `totalTaxV2` instead") + + """ + The sum of all the taxes applied to the line items and shipping lines in the checkout. + """ + totalTaxV2: MoneyV2! + + """The date and time when the checkout was last updated.""" + updatedAt: DateTime! + + """The url pointing to the checkout accessible from the web.""" + webUrl: URL! +} + +"""Specifies the fields required to update a checkout's attributes.""" +input CheckoutAttributesUpdateInput { + """ + The text of an optional note that a shop owner can attach to the checkout. + """ + note: String + + """A list of extra information that is added to the checkout.""" + customAttributes: [AttributeInput!] + + """ + Allows setting partial addresses on a Checkout, skipping the full validation of attributes. + The required attributes are city, province, and country. + Full validation of the addresses is still done at complete time. + + """ + allowPartialAddresses: Boolean = false +} + +"""Return type for `checkoutAttributesUpdate` mutation.""" +type CheckoutAttributesUpdatePayload { + """The updated checkout object.""" + checkout: Checkout! + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Specifies the fields required to update a checkout's attributes.""" +input CheckoutAttributesUpdateV2Input { + """ + The text of an optional note that a shop owner can attach to the checkout. + """ + note: String + + """A list of extra information that is added to the checkout.""" + customAttributes: [AttributeInput!] + + """ + Allows setting partial addresses on a Checkout, skipping the full validation of attributes. + The required attributes are city, province, and country. + Full validation of the addresses is still done at complete time. + + """ + allowPartialAddresses: Boolean = false +} + +"""Return type for `checkoutAttributesUpdateV2` mutation.""" +type CheckoutAttributesUpdateV2Payload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutCompleteFree` mutation.""" +type CheckoutCompleteFreePayload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutCompleteWithCreditCard` mutation.""" +type CheckoutCompleteWithCreditCardPayload { + """The checkout on which the payment was applied.""" + checkout: Checkout! + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """A representation of the attempted payment.""" + payment: Payment + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutCompleteWithCreditCardV2` mutation.""" +type CheckoutCompleteWithCreditCardV2Payload { + """The checkout on which the payment was applied.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """A representation of the attempted payment.""" + payment: Payment + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutCompleteWithTokenizedPayment` mutation.""" +type CheckoutCompleteWithTokenizedPaymentPayload { + """The checkout on which the payment was applied.""" + checkout: Checkout! + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """A representation of the attempted payment.""" + payment: Payment + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutCompleteWithTokenizedPaymentV2` mutation.""" +type CheckoutCompleteWithTokenizedPaymentV2Payload { + """The checkout on which the payment was applied.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """A representation of the attempted payment.""" + payment: Payment + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutCompleteWithTokenizedPaymentV3` mutation.""" +type CheckoutCompleteWithTokenizedPaymentV3Payload { + """The checkout on which the payment was applied.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """A representation of the attempted payment.""" + payment: Payment + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Specifies the fields required to create a checkout.""" +input CheckoutCreateInput { + """The email with which the customer wants to checkout.""" + email: String + + """ + A list of line item objects, each one containing information about an item in the checkout. + """ + lineItems: [CheckoutLineItemInput!] + + """The shipping address to where the line items will be shipped.""" + shippingAddress: MailingAddressInput + + """ + The text of an optional note that a shop owner can attach to the checkout. + """ + note: String + + """A list of extra information that is added to the checkout.""" + customAttributes: [AttributeInput!] + + """ + Allows setting partial addresses on a Checkout, skipping the full validation of attributes. + The required attributes are city, province, and country. + Full validation of addresses is still done at complete time. + + """ + allowPartialAddresses: Boolean + + """ + The three-letter currency code of one of the shop's enabled presentment currencies. + Including this field creates a checkout in the specified currency. By default, new + checkouts are created in the shop's primary currency. + + """ + presentmentCurrencyCode: CurrencyCode +} + +"""Return type for `checkoutCreate` mutation.""" +type CheckoutCreatePayload { + """The new checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutCustomerAssociate` mutation.""" +type CheckoutCustomerAssociatePayload { + """The updated checkout object.""" + checkout: Checkout! + + """The associated customer object.""" + customer: Customer + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `checkoutCustomerAssociateV2` mutation.""" +type CheckoutCustomerAssociateV2Payload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """The associated customer object.""" + customer: Customer + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutCustomerDisassociate` mutation.""" +type CheckoutCustomerDisassociatePayload { + """The updated checkout object.""" + checkout: Checkout! + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutCustomerDisassociateV2` mutation.""" +type CheckoutCustomerDisassociateV2Payload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutDiscountCodeApply` mutation.""" +type CheckoutDiscountCodeApplyPayload { + """The updated checkout object.""" + checkout: Checkout! + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutDiscountCodeApplyV2` mutation.""" +type CheckoutDiscountCodeApplyV2Payload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutDiscountCodeRemove` mutation.""" +type CheckoutDiscountCodeRemovePayload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutEmailUpdate` mutation.""" +type CheckoutEmailUpdatePayload { + """The checkout object with the updated email.""" + checkout: Checkout! + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutEmailUpdateV2` mutation.""" +type CheckoutEmailUpdateV2Payload { + """The checkout object with the updated email.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Possible error codes that could be returned by CheckoutUserError.""" +enum CheckoutErrorCode { + """Input value is blank.""" + BLANK + + """Input value is invalid.""" + INVALID + + """Input value is too long.""" + TOO_LONG + + """Input value is not present.""" + PRESENT + + """Input value should be less than maximum allowed value.""" + LESS_THAN + + """Input value should be greater than or equal to minimum allowed value.""" + GREATER_THAN_OR_EQUAL_TO + + """Input value should be less or equal to maximum allowed value.""" + LESS_THAN_OR_EQUAL_TO + + """Checkout is already completed.""" + ALREADY_COMPLETED + + """Checkout is locked.""" + LOCKED + + """Input value is not supported.""" + NOT_SUPPORTED + + """Input email contains an invalid domain name.""" + BAD_DOMAIN + + """Input Zip is invalid for country provided.""" + INVALID_FOR_COUNTRY + + """Input Zip is invalid for country and province provided.""" + INVALID_FOR_COUNTRY_AND_PROVINCE + + """Invalid state in country.""" + INVALID_STATE_IN_COUNTRY + + """Invalid province in country.""" + INVALID_PROVINCE_IN_COUNTRY + + """Invalid region in country.""" + INVALID_REGION_IN_COUNTRY + + """Shipping rate expired.""" + SHIPPING_RATE_EXPIRED + + """Gift card cannot be applied to a checkout that contains a gift card.""" + GIFT_CARD_UNUSABLE + + """Gift card is disabled.""" + GIFT_CARD_DISABLED + + """Gift card code is invalid.""" + GIFT_CARD_CODE_INVALID + + """Gift card has already been applied.""" + GIFT_CARD_ALREADY_APPLIED + + """Gift card currency does not match checkout currency.""" + GIFT_CARD_CURRENCY_MISMATCH + + """Gift card is expired.""" + GIFT_CARD_EXPIRED + + """Gift card has no funds left.""" + GIFT_CARD_DEPLETED + + """Gift card was not found.""" + GIFT_CARD_NOT_FOUND + + """Cart does not meet discount requirements notice.""" + CART_DOES_NOT_MEET_DISCOUNT_REQUIREMENTS_NOTICE + + """Discount expired.""" + DISCOUNT_EXPIRED + + """Discount disabled.""" + DISCOUNT_DISABLED + + """Discount limit reached.""" + DISCOUNT_LIMIT_REACHED + + """Discount not found.""" + DISCOUNT_NOT_FOUND + + """Customer already used once per customer discount notice.""" + CUSTOMER_ALREADY_USED_ONCE_PER_CUSTOMER_DISCOUNT_NOTICE + + """Checkout is already completed.""" + EMPTY + + """Not enough in stock.""" + NOT_ENOUGH_IN_STOCK + + """Missing payment input.""" + MISSING_PAYMENT_INPUT + + """The amount of the payment does not match the value to be paid.""" + TOTAL_PRICE_MISMATCH + + """Line item was not found in checkout.""" + LINE_ITEM_NOT_FOUND + + """Unable to apply discount.""" + UNABLE_TO_APPLY + + """Discount already applied.""" + DISCOUNT_ALREADY_APPLIED +} + +"""Return type for `checkoutGiftCardApply` mutation.""" +type CheckoutGiftCardApplyPayload { + """The updated checkout object.""" + checkout: Checkout! + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutGiftCardRemove` mutation.""" +type CheckoutGiftCardRemovePayload { + """The updated checkout object.""" + checkout: Checkout! + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutGiftCardRemoveV2` mutation.""" +type CheckoutGiftCardRemoveV2Payload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutGiftCardsAppend` mutation.""" +type CheckoutGiftCardsAppendPayload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""A single line item in the checkout, grouped by variant and attributes.""" +type CheckoutLineItem implements Node { + """ + Extra information in the form of an array of Key-Value pairs about the line item. + """ + customAttributes: [Attribute!]! + + """ + The discounts that have been allocated onto the checkout line item by discount applications. + """ + discountAllocations: [DiscountAllocation!]! + + """Globally unique identifier.""" + id: ID! + + """The quantity of the line item.""" + quantity: Int! + + """Title of the line item. Defaults to the product's title.""" + title: String! + + """Unit price of the line item.""" + unitPrice: MoneyV2 + + """Product variant of the line item.""" + variant: ProductVariant +} + +""" +An auto-generated type for paginating through multiple CheckoutLineItems. + +""" +type CheckoutLineItemConnection { + """A list of edges.""" + edges: [CheckoutLineItemEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one CheckoutLineItem and a cursor during pagination. + +""" +type CheckoutLineItemEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of CheckoutLineItemEdge.""" + node: CheckoutLineItem! +} + +"""Specifies the input fields to create a line item on a checkout.""" +input CheckoutLineItemInput { + """ + Extra information in the form of an array of Key-Value pairs about the line item. + """ + customAttributes: [AttributeInput!] + + """The quantity of the line item.""" + quantity: Int! + + """The identifier of the product variant for the line item.""" + variantId: ID! +} + +"""Return type for `checkoutLineItemsAdd` mutation.""" +type CheckoutLineItemsAddPayload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutLineItemsRemove` mutation.""" +type CheckoutLineItemsRemovePayload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutLineItemsReplace` mutation.""" +type CheckoutLineItemsReplacePayload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + userErrors: [CheckoutUserError!]! +} + +"""Return type for `checkoutLineItemsUpdate` mutation.""" +type CheckoutLineItemsUpdatePayload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Specifies the input fields to update a line item on the checkout.""" +input CheckoutLineItemUpdateInput { + """The identifier of the line item.""" + id: ID + + """The variant identifier of the line item.""" + variantId: ID + + """The quantity of the line item.""" + quantity: Int + + """ + Extra information in the form of an array of Key-Value pairs about the line item. + """ + customAttributes: [AttributeInput!] +} + +"""Return type for `checkoutShippingAddressUpdate` mutation.""" +type CheckoutShippingAddressUpdatePayload { + """The updated checkout object.""" + checkout: Checkout! + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutShippingAddressUpdateV2` mutation.""" +type CheckoutShippingAddressUpdateV2Payload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +"""Return type for `checkoutShippingLineUpdate` mutation.""" +type CheckoutShippingLineUpdatePayload { + """The updated checkout object.""" + checkout: Checkout + + """List of errors that occurred executing the mutation.""" + checkoutUserErrors: [CheckoutUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `checkoutUserErrors` instead") +} + +""" +Represents an error that happens during execution of a checkout mutation. +""" +type CheckoutUserError implements DisplayableError { + """Error code to uniquely identify the error.""" + code: CheckoutErrorCode + + """Path to the input field which caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +A collection represents a grouping of products that a shop owner can create to +organize them or make their shops easier to browse. +""" +type Collection implements Node { + """ + Stripped description of the collection, single line with HTML tags removed. + """ + description( + """Truncates string after the given length.""" + truncateAt: Int + ): String! + + """The description of the collection, complete with HTML formatting.""" + descriptionHtml: HTML! + + """ + A human-friendly unique string for the collection automatically generated from its title. + Limit of 255 characters. + + """ + handle: String! + + """Globally unique identifier.""" + id: ID! + + """Image associated with the collection.""" + image( + """ + Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. + """ + maxWidth: Int + + """ + Image height in pixels between 1 and 2048. This argument is deprecated: Use + `maxHeight` on `Image.transformedSrc` instead. + """ + maxHeight: Int + + """ + Crops the image according to the specified region. This argument is + deprecated: Use `crop` on `Image.transformedSrc` instead. + """ + crop: CropRegion + + """ + Image size multiplier for high-resolution retina displays. Must be between 1 + and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. + """ + scale: Int = 1 + ): Image + + """List of products in the collection.""" + products( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: ProductCollectionSortKeys = COLLECTION_DEFAULT + ): ProductConnection! + + """The collection’s name. Limit of 255 characters.""" + title: String! + + """The date and time when the collection was last modified.""" + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple Collections. + +""" +type CollectionConnection { + """A list of edges.""" + edges: [CollectionEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Collection and a cursor during pagination. + +""" +type CollectionEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of CollectionEdge.""" + node: Collection! +} + +"""The set of valid sort keys for the Collection query.""" +enum CollectionSortKeys { + """Sort by the `title` value.""" + TITLE + + """Sort by the `updated_at` value.""" + UPDATED_AT + + """Sort by the `id` value.""" + ID + + """ + During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the + results by relevance to the search term(s). When no search query is specified, this sort key is not + deterministic and should not be used. + + """ + RELEVANCE +} + +"""A comment on an article.""" +type Comment implements Node { + """The comment’s author.""" + author: CommentAuthor! + + """Stripped content of the comment, single line with HTML tags removed.""" + content( + """Truncates string after the given length.""" + truncateAt: Int + ): String! + + """The content of the comment, complete with HTML formatting.""" + contentHtml: HTML! + + """Globally unique identifier.""" + id: ID! +} + +"""The author of a comment.""" +type CommentAuthor { + """The author's email.""" + email: String! + + """The author’s name.""" + name: String! +} + +""" +An auto-generated type for paginating through multiple Comments. + +""" +type CommentConnection { + """A list of edges.""" + edges: [CommentEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Comment and a cursor during pagination. + +""" +type CommentEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of CommentEdge.""" + node: Comment! +} + +"""ISO 3166-1 alpha-2 country codes with some differences.""" +enum CountryCode { + """Afghanistan.""" + AF + + """Åland Islands.""" + AX + + """Albania.""" + AL + + """Algeria.""" + DZ + + """Andorra.""" + AD + + """Angola.""" + AO + + """Anguilla.""" + AI + + """Antigua & Barbuda.""" + AG + + """Argentina.""" + AR + + """Armenia.""" + AM + + """Aruba.""" + AW + + """Ascension Island.""" + AC + + """Australia.""" + AU + + """Austria.""" + AT + + """Azerbaijan.""" + AZ + + """Bahamas.""" + BS + + """Bahrain.""" + BH + + """Bangladesh.""" + BD + + """Barbados.""" + BB + + """Belarus.""" + BY + + """Belgium.""" + BE + + """Belize.""" + BZ + + """Benin.""" + BJ + + """Bermuda.""" + BM + + """Bhutan.""" + BT + + """Bolivia.""" + BO + + """Bosnia & Herzegovina.""" + BA + + """Botswana.""" + BW + + """Bouvet Island.""" + BV + + """Brazil.""" + BR + + """British Indian Ocean Territory.""" + IO + + """Brunei.""" + BN + + """Bulgaria.""" + BG + + """Burkina Faso.""" + BF + + """Burundi.""" + BI + + """Cambodia.""" + KH + + """Canada.""" + CA + + """Cape Verde.""" + CV + + """Caribbean Netherlands.""" + BQ + + """Cayman Islands.""" + KY + + """Central African Republic.""" + CF + + """Chad.""" + TD + + """Chile.""" + CL + + """China.""" + CN + + """Christmas Island.""" + CX + + """Cocos (Keeling) Islands.""" + CC + + """Colombia.""" + CO + + """Comoros.""" + KM + + """Congo - Brazzaville.""" + CG + + """Congo - Kinshasa.""" + CD + + """Cook Islands.""" + CK + + """Costa Rica.""" + CR + + """Croatia.""" + HR + + """Cuba.""" + CU + + """Curaçao.""" + CW + + """Cyprus.""" + CY + + """Czechia.""" + CZ + + """Côte d’Ivoire.""" + CI + + """Denmark.""" + DK + + """Djibouti.""" + DJ + + """Dominica.""" + DM + + """Dominican Republic.""" + DO + + """Ecuador.""" + EC + + """Egypt.""" + EG + + """El Salvador.""" + SV + + """Equatorial Guinea.""" + GQ + + """Eritrea.""" + ER + + """Estonia.""" + EE + + """Eswatini.""" + SZ + + """Ethiopia.""" + ET + + """Falkland Islands.""" + FK + + """Faroe Islands.""" + FO + + """Fiji.""" + FJ + + """Finland.""" + FI + + """France.""" + FR + + """French Guiana.""" + GF + + """French Polynesia.""" + PF + + """French Southern Territories.""" + TF + + """Gabon.""" + GA + + """Gambia.""" + GM + + """Georgia.""" + GE + + """Germany.""" + DE + + """Ghana.""" + GH + + """Gibraltar.""" + GI + + """Greece.""" + GR + + """Greenland.""" + GL + + """Grenada.""" + GD + + """Guadeloupe.""" + GP + + """Guatemala.""" + GT + + """Guernsey.""" + GG + + """Guinea.""" + GN + + """Guinea-Bissau.""" + GW + + """Guyana.""" + GY + + """Haiti.""" + HT + + """Heard & McDonald Islands.""" + HM + + """Vatican City.""" + VA + + """Honduras.""" + HN + + """Hong Kong SAR.""" + HK + + """Hungary.""" + HU + + """Iceland.""" + IS + + """India.""" + IN + + """Indonesia.""" + ID + + """Iran.""" + IR + + """Iraq.""" + IQ + + """Ireland.""" + IE + + """Isle of Man.""" + IM + + """Israel.""" + IL + + """Italy.""" + IT + + """Jamaica.""" + JM + + """Japan.""" + JP + + """Jersey.""" + JE + + """Jordan.""" + JO + + """Kazakhstan.""" + KZ + + """Kenya.""" + KE + + """Kiribati.""" + KI + + """North Korea.""" + KP + + """Kosovo.""" + XK + + """Kuwait.""" + KW + + """Kyrgyzstan.""" + KG + + """Laos.""" + LA + + """Latvia.""" + LV + + """Lebanon.""" + LB + + """Lesotho.""" + LS + + """Liberia.""" + LR + + """Libya.""" + LY + + """Liechtenstein.""" + LI + + """Lithuania.""" + LT + + """Luxembourg.""" + LU + + """Macao SAR.""" + MO + + """Madagascar.""" + MG + + """Malawi.""" + MW + + """Malaysia.""" + MY + + """Maldives.""" + MV + + """Mali.""" + ML + + """Malta.""" + MT + + """Martinique.""" + MQ + + """Mauritania.""" + MR + + """Mauritius.""" + MU + + """Mayotte.""" + YT + + """Mexico.""" + MX + + """Moldova.""" + MD + + """Monaco.""" + MC + + """Mongolia.""" + MN + + """Montenegro.""" + ME + + """Montserrat.""" + MS + + """Morocco.""" + MA + + """Mozambique.""" + MZ + + """Myanmar (Burma).""" + MM + + """Namibia.""" + NA + + """Nauru.""" + NR + + """Nepal.""" + NP + + """Netherlands.""" + NL + + """Netherlands Antilles.""" + AN + + """New Caledonia.""" + NC + + """New Zealand.""" + NZ + + """Nicaragua.""" + NI + + """Niger.""" + NE + + """Nigeria.""" + NG + + """Niue.""" + NU + + """Norfolk Island.""" + NF + + """North Macedonia.""" + MK + + """Norway.""" + NO + + """Oman.""" + OM + + """Pakistan.""" + PK + + """Palestinian Territories.""" + PS + + """Panama.""" + PA + + """Papua New Guinea.""" + PG + + """Paraguay.""" + PY + + """Peru.""" + PE + + """Philippines.""" + PH + + """Pitcairn Islands.""" + PN + + """Poland.""" + PL + + """Portugal.""" + PT + + """Qatar.""" + QA + + """Cameroon.""" + CM + + """Réunion.""" + RE + + """Romania.""" + RO + + """Russia.""" + RU + + """Rwanda.""" + RW + + """St. Barthélemy.""" + BL + + """St. Helena.""" + SH + + """St. Kitts & Nevis.""" + KN + + """St. Lucia.""" + LC + + """St. Martin.""" + MF + + """St. Pierre & Miquelon.""" + PM + + """Samoa.""" + WS + + """San Marino.""" + SM + + """São Tomé & Príncipe.""" + ST + + """Saudi Arabia.""" + SA + + """Senegal.""" + SN + + """Serbia.""" + RS + + """Seychelles.""" + SC + + """Sierra Leone.""" + SL + + """Singapore.""" + SG + + """Sint Maarten.""" + SX + + """Slovakia.""" + SK + + """Slovenia.""" + SI + + """Solomon Islands.""" + SB + + """Somalia.""" + SO + + """South Africa.""" + ZA + + """South Georgia & South Sandwich Islands.""" + GS + + """South Korea.""" + KR + + """South Sudan.""" + SS + + """Spain.""" + ES + + """Sri Lanka.""" + LK + + """St. Vincent & Grenadines.""" + VC + + """Sudan.""" + SD + + """Suriname.""" + SR + + """Svalbard & Jan Mayen.""" + SJ + + """Sweden.""" + SE + + """Switzerland.""" + CH + + """Syria.""" + SY + + """Taiwan.""" + TW + + """Tajikistan.""" + TJ + + """Tanzania.""" + TZ + + """Thailand.""" + TH + + """Timor-Leste.""" + TL + + """Togo.""" + TG + + """Tokelau.""" + TK + + """Tonga.""" + TO + + """Trinidad & Tobago.""" + TT + + """Tristan da Cunha.""" + TA + + """Tunisia.""" + TN + + """Turkey.""" + TR + + """Turkmenistan.""" + TM + + """Turks & Caicos Islands.""" + TC + + """Tuvalu.""" + TV + + """Uganda.""" + UG + + """Ukraine.""" + UA + + """United Arab Emirates.""" + AE + + """United Kingdom.""" + GB + + """United States.""" + US + + """U.S. Outlying Islands.""" + UM + + """Uruguay.""" + UY + + """Uzbekistan.""" + UZ + + """Vanuatu.""" + VU + + """Venezuela.""" + VE + + """Vietnam.""" + VN + + """British Virgin Islands.""" + VG + + """Wallis & Futuna.""" + WF + + """Western Sahara.""" + EH + + """Yemen.""" + YE + + """Zambia.""" + ZM + + """Zimbabwe.""" + ZW + + """Unknown Region.""" + ZZ +} + +"""Credit card information used for a payment.""" +type CreditCard { + """The brand of the credit card.""" + brand: String + + """The expiry month of the credit card.""" + expiryMonth: Int + + """The expiry year of the credit card.""" + expiryYear: Int + + """The credit card's BIN number.""" + firstDigits: String + + """The first name of the card holder.""" + firstName: String + + """The last 4 digits of the credit card.""" + lastDigits: String + + """The last name of the card holder.""" + lastName: String + + """The masked credit card number with only the last 4 digits displayed.""" + maskedNumber: String +} + +""" +Specifies the fields required to complete a checkout with +a Shopify vaulted credit card payment. + +""" +input CreditCardPaymentInput { + """The amount of the payment.""" + amount: Money! + + """ + A unique client generated key used to avoid duplicate charges. When a + duplicate payment is found, the original is returned instead of creating a new + one. For more information, refer to [Idempotent + requests](https://shopify.dev/concepts/about-apis/idempotent-requests). + """ + idempotencyKey: String! + + """The billing address for the payment.""" + billingAddress: MailingAddressInput! + + """The ID returned by Shopify's Card Vault.""" + vaultId: String! + + """Executes the payment in test mode if possible. Defaults to `false`.""" + test: Boolean = false +} + +""" +Specifies the fields required to complete a checkout with +a Shopify vaulted credit card payment. + +""" +input CreditCardPaymentInputV2 { + """The amount and currency of the payment.""" + paymentAmount: MoneyInput! + + """ + A unique client generated key used to avoid duplicate charges. When a + duplicate payment is found, the original is returned instead of creating a new + one. For more information, refer to [Idempotent + requests](https://shopify.dev/concepts/about-apis/idempotent-requests). + """ + idempotencyKey: String! + + """The billing address for the payment.""" + billingAddress: MailingAddressInput! + + """The ID returned by Shopify's Card Vault.""" + vaultId: String! + + """Executes the payment in test mode if possible. Defaults to `false`.""" + test: Boolean = false +} + +"""The part of the image that should remain after cropping.""" +enum CropRegion { + """Keep the center of the image.""" + CENTER + + """Keep the top of the image.""" + TOP + + """Keep the bottom of the image.""" + BOTTOM + + """Keep the left of the image.""" + LEFT + + """Keep the right of the image.""" + RIGHT +} + +"""Currency codes.""" +enum CurrencyCode { + """United States Dollars (USD).""" + USD + + """Euro (EUR).""" + EUR + + """United Kingdom Pounds (GBP).""" + GBP + + """Canadian Dollars (CAD).""" + CAD + + """Afghan Afghani (AFN).""" + AFN + + """Albanian Lek (ALL).""" + ALL + + """Algerian Dinar (DZD).""" + DZD + + """Angolan Kwanza (AOA).""" + AOA + + """Argentine Pesos (ARS).""" + ARS + + """Armenian Dram (AMD).""" + AMD + + """Aruban Florin (AWG).""" + AWG + + """Australian Dollars (AUD).""" + AUD + + """Barbadian Dollar (BBD).""" + BBD + + """Azerbaijani Manat (AZN).""" + AZN + + """Bangladesh Taka (BDT).""" + BDT + + """Bahamian Dollar (BSD).""" + BSD + + """Bahraini Dinar (BHD).""" + BHD + + """Burundian Franc (BIF).""" + BIF + + """Belize Dollar (BZD).""" + BZD + + """Bermudian Dollar (BMD).""" + BMD + + """Bhutanese Ngultrum (BTN).""" + BTN + + """Bosnia and Herzegovina Convertible Mark (BAM).""" + BAM + + """Brazilian Real (BRL).""" + BRL + + """Bolivian Boliviano (BOB).""" + BOB + + """Botswana Pula (BWP).""" + BWP + + """Brunei Dollar (BND).""" + BND + + """Bulgarian Lev (BGN).""" + BGN + + """Burmese Kyat (MMK).""" + MMK + + """Cambodian Riel.""" + KHR + + """Cape Verdean escudo (CVE).""" + CVE + + """Cayman Dollars (KYD).""" + KYD + + """Central African CFA Franc (XAF).""" + XAF + + """Chilean Peso (CLP).""" + CLP + + """Chinese Yuan Renminbi (CNY).""" + CNY + + """Colombian Peso (COP).""" + COP + + """Comorian Franc (KMF).""" + KMF + + """Congolese franc (CDF).""" + CDF + + """Costa Rican Colones (CRC).""" + CRC + + """Croatian Kuna (HRK).""" + HRK + + """Czech Koruny (CZK).""" + CZK + + """Danish Kroner (DKK).""" + DKK + + """Dominican Peso (DOP).""" + DOP + + """East Caribbean Dollar (XCD).""" + XCD + + """Egyptian Pound (EGP).""" + EGP + + """Ethiopian Birr (ETB).""" + ETB + + """CFP Franc (XPF).""" + XPF + + """Fijian Dollars (FJD).""" + FJD + + """Gambian Dalasi (GMD).""" + GMD + + """Ghanaian Cedi (GHS).""" + GHS + + """Guatemalan Quetzal (GTQ).""" + GTQ + + """Guyanese Dollar (GYD).""" + GYD + + """Georgian Lari (GEL).""" + GEL + + """Haitian Gourde (HTG).""" + HTG + + """Honduran Lempira (HNL).""" + HNL + + """Hong Kong Dollars (HKD).""" + HKD + + """Hungarian Forint (HUF).""" + HUF + + """Icelandic Kronur (ISK).""" + ISK + + """Indian Rupees (INR).""" + INR + + """Indonesian Rupiah (IDR).""" + IDR + + """Israeli New Shekel (NIS).""" + ILS + + """Iraqi Dinar (IQD).""" + IQD + + """Jamaican Dollars (JMD).""" + JMD + + """Japanese Yen (JPY).""" + JPY + + """Jersey Pound.""" + JEP + + """Jordanian Dinar (JOD).""" + JOD + + """Kazakhstani Tenge (KZT).""" + KZT + + """Kenyan Shilling (KES).""" + KES + + """Kuwaiti Dinar (KWD).""" + KWD + + """Kyrgyzstani Som (KGS).""" + KGS + + """Laotian Kip (LAK).""" + LAK + + """Latvian Lati (LVL).""" + LVL + + """Lebanese Pounds (LBP).""" + LBP + + """Lesotho Loti (LSL).""" + LSL + + """Liberian Dollar (LRD).""" + LRD + + """Lithuanian Litai (LTL).""" + LTL + + """Malagasy Ariary (MGA).""" + MGA + + """Macedonia Denar (MKD).""" + MKD + + """Macanese Pataca (MOP).""" + MOP + + """Malawian Kwacha (MWK).""" + MWK + + """Maldivian Rufiyaa (MVR).""" + MVR + + """Mexican Pesos (MXN).""" + MXN + + """Malaysian Ringgits (MYR).""" + MYR + + """Mauritian Rupee (MUR).""" + MUR + + """Moldovan Leu (MDL).""" + MDL + + """Moroccan Dirham.""" + MAD + + """Mongolian Tugrik.""" + MNT + + """Mozambican Metical.""" + MZN + + """Namibian Dollar.""" + NAD + + """Nepalese Rupee (NPR).""" + NPR + + """Netherlands Antillean Guilder.""" + ANG + + """New Zealand Dollars (NZD).""" + NZD + + """Nicaraguan Córdoba (NIO).""" + NIO + + """Nigerian Naira (NGN).""" + NGN + + """Norwegian Kroner (NOK).""" + NOK + + """Omani Rial (OMR).""" + OMR + + """Panamian Balboa (PAB).""" + PAB + + """Pakistani Rupee (PKR).""" + PKR + + """Papua New Guinean Kina (PGK).""" + PGK + + """Paraguayan Guarani (PYG).""" + PYG + + """Peruvian Nuevo Sol (PEN).""" + PEN + + """Philippine Peso (PHP).""" + PHP + + """Polish Zlotych (PLN).""" + PLN + + """Qatari Rial (QAR).""" + QAR + + """Romanian Lei (RON).""" + RON + + """Russian Rubles (RUB).""" + RUB + + """Rwandan Franc (RWF).""" + RWF + + """Samoan Tala (WST).""" + WST + + """Saudi Riyal (SAR).""" + SAR + + """Sao Tome And Principe Dobra (STD).""" + STD + + """Serbian dinar (RSD).""" + RSD + + """Seychellois Rupee (SCR).""" + SCR + + """Singapore Dollars (SGD).""" + SGD + + """Sudanese Pound (SDG).""" + SDG + + """Syrian Pound (SYP).""" + SYP + + """South African Rand (ZAR).""" + ZAR + + """South Korean Won (KRW).""" + KRW + + """South Sudanese Pound (SSP).""" + SSP + + """Solomon Islands Dollar (SBD).""" + SBD + + """Sri Lankan Rupees (LKR).""" + LKR + + """Surinamese Dollar (SRD).""" + SRD + + """Swazi Lilangeni (SZL).""" + SZL + + """Swedish Kronor (SEK).""" + SEK + + """Swiss Francs (CHF).""" + CHF + + """Taiwan Dollars (TWD).""" + TWD + + """Thai baht (THB).""" + THB + + """Tanzanian Shilling (TZS).""" + TZS + + """Trinidad and Tobago Dollars (TTD).""" + TTD + + """Tunisian Dinar (TND).""" + TND + + """Turkish Lira (TRY).""" + TRY + + """Turkmenistani Manat (TMT).""" + TMT + + """Ugandan Shilling (UGX).""" + UGX + + """Ukrainian Hryvnia (UAH).""" + UAH + + """United Arab Emirates Dirham (AED).""" + AED + + """Uruguayan Pesos (UYU).""" + UYU + + """Uzbekistan som (UZS).""" + UZS + + """Vanuatu Vatu (VUV).""" + VUV + + """Vietnamese đồng (VND).""" + VND + + """West African CFA franc (XOF).""" + XOF + + """Yemeni Rial (YER).""" + YER + + """Zambian Kwacha (ZMW).""" + ZMW + + """Belarusian Ruble (BYN).""" + BYN + + """Belarusian Ruble (BYR).""" + BYR @deprecated(reason: "`BYR` is deprecated. Use `BYN` available from version `2021-01` onwards instead.") + + """Djiboutian Franc (DJF).""" + DJF + + """Eritrean Nakfa (ERN).""" + ERN + + """Falkland Islands Pounds (FKP).""" + FKP + + """Gibraltar Pounds (GIP).""" + GIP + + """Guinean Franc (GNF).""" + GNF + + """Iranian Rial (IRR).""" + IRR + + """Kiribati Dollar (KID).""" + KID + + """Libyan Dinar (LYD).""" + LYD + + """Mauritanian Ouguiya (MRU).""" + MRU + + """Sierra Leonean Leone (SLL).""" + SLL + + """Saint Helena Pounds (SHP).""" + SHP + + """Somali Shilling (SOS).""" + SOS + + """Tajikistani Somoni (TJS).""" + TJS + + """Tongan Pa'anga (TOP).""" + TOP + + """Venezuelan Bolivares (VEF).""" + VEF @deprecated(reason: "`VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead.") + + """Venezuelan Bolivares (VES).""" + VES +} + +""" +A customer represents a customer account with the shop. Customer accounts store +contact information for the customer, saving logged-in customers the trouble of +having to provide it at every checkout. +""" +type Customer { + """ + Indicates whether the customer has consented to be sent marketing material via email. + """ + acceptsMarketing: Boolean! + + """A list of addresses for the customer.""" + addresses( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MailingAddressConnection! + + """The date and time when the customer was created.""" + createdAt: DateTime! + + """The customer’s default address.""" + defaultAddress: MailingAddress + + """The customer’s name, email or phone number.""" + displayName: String! + + """The customer’s email address.""" + email: String + + """The customer’s first name.""" + firstName: String + + """A unique identifier for the customer.""" + id: ID! + + """The customer's most recently updated, incomplete checkout.""" + lastIncompleteCheckout: Checkout + + """The customer’s last name.""" + lastName: String + + """The orders associated with the customer.""" + orders( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: OrderSortKeys = ID + + """ + Supported filter parameters: + - `processed_at` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): OrderConnection! + + """The customer’s phone number.""" + phone: String + + """ + A comma separated list of tags that have been added to the customer. + Additional access scope required: unauthenticated_read_customer_tags. + + """ + tags: [String!]! + + """The date and time when the customer information was updated.""" + updatedAt: DateTime! +} + +""" +A CustomerAccessToken represents the unique token required to make modifications to the customer object. +""" +type CustomerAccessToken { + """The customer’s access token.""" + accessToken: String! + + """The date and time when the customer access token expires.""" + expiresAt: DateTime! +} + +"""Specifies the input fields required to create a customer access token.""" +input CustomerAccessTokenCreateInput { + """The email associated to the customer.""" + email: String! + + """The login password to be used by the customer.""" + password: String! +} + +"""Return type for `customerAccessTokenCreate` mutation.""" +type CustomerAccessTokenCreatePayload { + """The newly created customer access token object.""" + customerAccessToken: CustomerAccessToken + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +"""Return type for `customerAccessTokenCreateWithMultipass` mutation.""" +type CustomerAccessTokenCreateWithMultipassPayload { + """An access token object associated with the customer.""" + customerAccessToken: CustomerAccessToken + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! +} + +"""Return type for `customerAccessTokenDelete` mutation.""" +type CustomerAccessTokenDeletePayload { + """The destroyed access token.""" + deletedAccessToken: String + + """ID of the destroyed customer access token.""" + deletedCustomerAccessTokenId: String + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `customerAccessTokenRenew` mutation.""" +type CustomerAccessTokenRenewPayload { + """The renewed customer access token object.""" + customerAccessToken: CustomerAccessToken + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! +} + +"""Return type for `customerActivateByUrl` mutation.""" +type CustomerActivateByUrlPayload { + """The customer that was activated.""" + customer: Customer + + """A new customer access token for the customer.""" + customerAccessToken: CustomerAccessToken + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! +} + +"""Specifies the input fields required to activate a customer.""" +input CustomerActivateInput { + """The activation token required to activate the customer.""" + activationToken: String! + + """New password that will be set during activation.""" + password: String! +} + +"""Return type for `customerActivate` mutation.""" +type CustomerActivatePayload { + """The customer object.""" + customer: Customer + + """A newly created customer access token object for the customer.""" + customerAccessToken: CustomerAccessToken + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +"""Return type for `customerAddressCreate` mutation.""" +type CustomerAddressCreatePayload { + """The new customer address object.""" + customerAddress: MailingAddress + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +"""Return type for `customerAddressDelete` mutation.""" +type CustomerAddressDeletePayload { + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """ID of the deleted customer address.""" + deletedCustomerAddressId: String + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +"""Return type for `customerAddressUpdate` mutation.""" +type CustomerAddressUpdatePayload { + """The customer’s updated mailing address.""" + customerAddress: MailingAddress + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +"""Specifies the fields required to create a new customer.""" +input CustomerCreateInput { + """The customer’s first name.""" + firstName: String + + """The customer’s last name.""" + lastName: String + + """The customer’s email.""" + email: String! + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + + """ + phone: String + + """The login password used by the customer.""" + password: String! + + """ + Indicates whether the customer has consented to be sent marketing material via email. + """ + acceptsMarketing: Boolean +} + +"""Return type for `customerCreate` mutation.""" +type CustomerCreatePayload { + """The created customer object.""" + customer: Customer + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +"""Return type for `customerDefaultAddressUpdate` mutation.""" +type CustomerDefaultAddressUpdatePayload { + """The updated customer object.""" + customer: Customer + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +"""Possible error codes that could be returned by CustomerUserError.""" +enum CustomerErrorCode { + """Input value is blank.""" + BLANK + + """Input value is invalid.""" + INVALID + + """Input value is already taken.""" + TAKEN + + """Input value is too long.""" + TOO_LONG + + """Input value is too short.""" + TOO_SHORT + + """Unidentified customer.""" + UNIDENTIFIED_CUSTOMER + + """Customer is disabled.""" + CUSTOMER_DISABLED + + """Input password starts or ends with whitespace.""" + PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE + + """Input contains HTML tags.""" + CONTAINS_HTML_TAGS + + """Input contains URL.""" + CONTAINS_URL + + """Invalid activation token.""" + TOKEN_INVALID + + """Customer already enabled.""" + ALREADY_ENABLED + + """Address does not exist.""" + NOT_FOUND + + """Input email contains an invalid domain name.""" + BAD_DOMAIN + + """Multipass token is not valid.""" + INVALID_MULTIPASS_REQUEST +} + +"""Return type for `customerRecover` mutation.""" +type CustomerRecoverPayload { + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +"""Return type for `customerResetByUrl` mutation.""" +type CustomerResetByUrlPayload { + """The customer object which was reset.""" + customer: Customer + + """A newly created customer access token object for the customer.""" + customerAccessToken: CustomerAccessToken + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +"""Specifies the fields required to reset a customer’s password.""" +input CustomerResetInput { + """The reset token required to reset the customer’s password.""" + resetToken: String! + + """New password that will be set as part of the reset password process.""" + password: String! +} + +"""Return type for `customerReset` mutation.""" +type CustomerResetPayload { + """The customer object which was reset.""" + customer: Customer + + """A newly created customer access token object for the customer.""" + customerAccessToken: CustomerAccessToken + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +"""Specifies the fields required to update the Customer information.""" +input CustomerUpdateInput { + """The customer’s first name.""" + firstName: String + + """The customer’s last name.""" + lastName: String + + """The customer’s email.""" + email: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. To remove the phone number, specify `null`. + + """ + phone: String + + """The login password used by the customer.""" + password: String + + """ + Indicates whether the customer has consented to be sent marketing material via email. + """ + acceptsMarketing: Boolean +} + +"""Return type for `customerUpdate` mutation.""" +type CustomerUpdatePayload { + """The updated customer object.""" + customer: Customer + + """ + The newly created customer access token. If the customer's password is updated, all previous access tokens + (including the one used to perform this mutation) become invalid, and a new token is generated. + + """ + customerAccessToken: CustomerAccessToken + + """List of errors that occurred executing the mutation.""" + customerUserErrors: [CustomerUserError!]! + + """List of errors that occurred executing the mutation.""" + userErrors: [UserError!]! @deprecated(reason: "Use `customerUserErrors` instead") +} + +""" +Represents an error that happens during execution of a customer mutation. +""" +type CustomerUserError implements DisplayableError { + """Error code to uniquely identify the error.""" + code: CustomerErrorCode + + """Path to the input field which caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +""" +An ISO-8601 encoded UTC date time string. Example value: `"2019-07-03T20:47:55Z"`. +""" +scalar DateTime + +""" +A signed decimal number, which supports arbitrary precision and is serialized as a string. Example value: `"29.99"`. +""" +scalar Decimal + +""" +Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. +""" +enum DigitalWallet { + """Apple Pay.""" + APPLE_PAY + + """Android Pay.""" + ANDROID_PAY + + """Google Pay.""" + GOOGLE_PAY + + """Shopify Pay.""" + SHOPIFY_PAY +} + +""" +An amount discounting the line that has been allocated by a discount. + +""" +type DiscountAllocation { + """Amount of discount allocated.""" + allocatedAmount: MoneyV2! + + """The discount this allocated amount originated from.""" + discountApplication: DiscountApplication! +} + +""" +Discount applications capture the intentions of a discount source at +the time of application. + +""" +interface DiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """Which lines of targetType that the discount is allocated over.""" + targetSelection: DiscountApplicationTargetSelection! + + """The type of line that the discount is applicable towards.""" + targetType: DiscountApplicationTargetType! + + """The value of the discount application.""" + value: PricingValue! +} + +""" +The method by which the discount's value is allocated onto its entitled lines. +""" +enum DiscountApplicationAllocationMethod { + """The value is spread across all entitled lines.""" + ACROSS + + """The value is applied onto every entitled line.""" + EACH + + """The value is specifically applied onto a particular line.""" + ONE @deprecated(reason: "Use ACROSS instead.") +} + +""" +An auto-generated type for paginating through multiple DiscountApplications. + +""" +type DiscountApplicationConnection { + """A list of edges.""" + edges: [DiscountApplicationEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one DiscountApplication and a cursor during pagination. + +""" +type DiscountApplicationEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of DiscountApplicationEdge.""" + node: DiscountApplication! +} + +""" +Which lines on the order that the discount is allocated over, of the type +defined by the Discount Application's target_type. + +""" +enum DiscountApplicationTargetSelection { + """The discount is allocated onto all the lines.""" + ALL + + """The discount is allocated onto only the lines it is entitled for.""" + ENTITLED + + """The discount is allocated onto explicitly chosen lines.""" + EXPLICIT +} + +""" +The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. + +""" +enum DiscountApplicationTargetType { + """The discount applies onto line items.""" + LINE_ITEM + + """The discount applies onto shipping lines.""" + SHIPPING_LINE +} + +""" +Discount code applications capture the intentions of a discount code at +the time that it is applied. + +""" +type DiscountCodeApplication implements DiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """Specifies whether the discount code was applied successfully.""" + applicable: Boolean! + + """ + The string identifying the discount code that was used at the time of application. + """ + code: String! + + """Which lines of targetType that the discount is allocated over.""" + targetSelection: DiscountApplicationTargetSelection! + + """The type of line that the discount is applicable towards.""" + targetType: DiscountApplicationTargetType! + + """The value of the discount application.""" + value: PricingValue! +} + +"""Represents an error in the input of a mutation.""" +interface DisplayableError { + """Path to the input field which caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Represents a web address.""" +type Domain { + """The host name of the domain (eg: `example.com`).""" + host: String! + + """Whether SSL is enabled or not.""" + sslEnabled: Boolean! + + """The URL of the domain (eg: `https://example.com`).""" + url: URL! +} + +"""Represents a video hosted outside of Shopify.""" +type ExternalVideo implements Node & Media { + """A word or phrase to share the nature or contents of a media.""" + alt: String + + """The URL.""" + embeddedUrl: URL! + + """The host of the external video.""" + host: MediaHost! + + """Globally unique identifier.""" + id: ID! + + """The media content type.""" + mediaContentType: MediaContentType! + + """The preview image for the media.""" + previewImage: Image +} + +"""Represents a single fulfillment in an order.""" +type Fulfillment { + """List of the fulfillment's line items.""" + fulfillmentLineItems( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): FulfillmentLineItemConnection! + + """The name of the tracking company.""" + trackingCompany: String + + """ + Tracking information associated with the fulfillment, + such as the tracking number and tracking URL. + + """ + trackingInfo( + """Truncate the array result to this size.""" + first: Int + ): [FulfillmentTrackingInfo!]! +} + +""" +Represents a single line item in a fulfillment. There is at most one fulfillment line item for each order line item. +""" +type FulfillmentLineItem { + """The associated order's line item.""" + lineItem: OrderLineItem! + + """The amount fulfilled in this fulfillment.""" + quantity: Int! +} + +""" +An auto-generated type for paginating through multiple FulfillmentLineItems. + +""" +type FulfillmentLineItemConnection { + """A list of edges.""" + edges: [FulfillmentLineItemEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. + +""" +type FulfillmentLineItemEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of FulfillmentLineItemEdge.""" + node: FulfillmentLineItem! +} + +"""Tracking information associated with the fulfillment.""" +type FulfillmentTrackingInfo { + """The tracking number of the fulfillment.""" + number: String + + """The URL to track the fulfillment.""" + url: URL +} + +""" +Represents information about the metafields associated to the specified resource. +""" +interface HasMetafields { + """The metafield associated with the resource.""" + metafield( + """Container for a set of metafields (maximum of 20 characters).""" + namespace: String! + + """Identifier for the metafield (maximum of 30 characters).""" + key: String! + ): Metafield + + """A paginated list of metafields associated with the resource.""" + metafields( + """Container for a set of metafields (maximum of 20 characters).""" + namespace: String + + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! +} + +""" +A string containing HTML code. Example value: `"

Grey cotton knit sweater.

"`. +""" +scalar HTML + +"""Represents an image resource.""" +type Image { + """A word or phrase to share the nature or contents of an image.""" + altText: String + + """ + The original height of the image in pixels. Returns `null` if the image is not hosted by Shopify. + """ + height: Int + + """A unique identifier for the image.""" + id: ID + + """ + The location of the original image as a URL. + + If there are any existing transformations in the original source URL, they will remain and not be stripped. + + """ + originalSrc: URL! + + """The location of the image as a URL.""" + src: URL! @deprecated(reason: "Previously an image had a single `src` field. This could either return the original image\nlocation or a URL that contained transformations such as sizing or scale.\n\nThese transformations were specified by arguments on the parent field.\n\nNow an image has two distinct URL fields: `originalSrc` and `transformedSrc`.\n\n* `originalSrc` - the original unmodified image URL\n* `transformedSrc` - the image URL with the specified transformations included\n\nTo migrate to the new fields, image transformations should be moved from the parent field to `transformedSrc`.\n\nBefore:\n```graphql\n{\n shop {\n productImages(maxWidth: 200, scale: 2) {\n edges {\n node {\n src\n }\n }\n }\n }\n}\n```\n\nAfter:\n```graphql\n{\n shop {\n productImages {\n edges {\n node {\n transformedSrc(maxWidth: 200, scale: 2)\n }\n }\n }\n }\n}\n```\n") + + """ + The location of the transformed image as a URL. + + All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. + Otherwise any transformations which an image type does not support will be ignored. + + """ + transformedSrc( + """Image width in pixels between 1 and 5760.""" + maxWidth: Int + + """Image height in pixels between 1 and 5760.""" + maxHeight: Int + + """Crops the image according to the specified region.""" + crop: CropRegion + + """ + Image size multiplier for high-resolution retina displays. Must be between 1 and 3. + """ + scale: Int = 1 + + """ + Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported). + """ + preferredContentType: ImageContentType + ): URL! + + """ + The original width of the image in pixels. Returns `null` if the image is not hosted by Shopify. + """ + width: Int +} + +""" +An auto-generated type for paginating through multiple Images. + +""" +type ImageConnection { + """A list of edges.""" + edges: [ImageEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +"""List of supported image content types.""" +enum ImageContentType { + """A PNG image.""" + PNG + + """A JPG image.""" + JPG + + """A WEBP image.""" + WEBP +} + +""" +An auto-generated type which holds one Image and a cursor during pagination. + +""" +type ImageEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of ImageEdge.""" + node: Image! +} + +"""Represents a mailing address for customers and shipping.""" +type MailingAddress implements Node { + """ + The first line of the address. Typically the street address or PO Box number. + + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + + """ + address2: String + + """ + The name of the city, district, village, or town. + + """ + city: String + + """ + The name of the customer's company or organization. + + """ + company: String + + """ + The name of the country. + + """ + country: String + + """ + The two-letter code for the country of the address. + + For example, US. + + """ + countryCode: String @deprecated(reason: "Use `countryCodeV2` instead") + + """ + The two-letter code for the country of the address. + + For example, US. + + """ + countryCodeV2: CountryCode + + """The first name of the customer.""" + firstName: String + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted( + """Whether to include the customer's name in the formatted address.""" + withName: Boolean = false + + """Whether to include the customer's company in the formatted address.""" + withCompany: Boolean = true + ): [String!]! + + """A comma-separated list of the values for city, province, and country.""" + formattedArea: String + + """Globally unique identifier.""" + id: ID! + + """The last name of the customer.""" + lastName: String + + """The latitude coordinate of the customer address.""" + latitude: Float + + """The longitude coordinate of the customer address.""" + longitude: Float + + """ + The full name of the customer, based on firstName and lastName. + + """ + name: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + + """ + phone: String + + """The region of the address, such as the province, state, or district.""" + province: String + + """ + The two-letter code for the region. + + For example, ON. + + """ + provinceCode: String + + """The zip or postal code of the address.""" + zip: String +} + +""" +An auto-generated type for paginating through multiple MailingAddresses. + +""" +type MailingAddressConnection { + """A list of edges.""" + edges: [MailingAddressEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MailingAddress and a cursor during pagination. + +""" +type MailingAddressEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of MailingAddressEdge.""" + node: MailingAddress! +} + +"""Specifies the fields accepted to create or update a mailing address.""" +input MailingAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + + """ + address1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + + """ + address2: String + + """ + The name of the city, district, village, or town. + + """ + city: String + + """ + The name of the customer's company or organization. + + """ + company: String + + """The name of the country.""" + country: String + + """The first name of the customer.""" + firstName: String + + """The last name of the customer.""" + lastName: String + + """ + A unique phone number for the customer. + + Formatted using E.164 standard. For example, _+16135551111_. + + """ + phone: String + + """The region of the address, such as the province, state, or district.""" + province: String + + """The zip or postal code of the address.""" + zip: String +} + +""" +Manual discount applications capture the intentions of a discount that was manually created. + +""" +type ManualDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """The description of the application.""" + description: String + + """Which lines of targetType that the discount is allocated over.""" + targetSelection: DiscountApplicationTargetSelection! + + """The type of line that the discount is applicable towards.""" + targetType: DiscountApplicationTargetType! + + """The title of the application.""" + title: String! + + """The value of the discount application.""" + value: PricingValue! +} + +"""Represents a media interface.""" +interface Media { + """A word or phrase to share the nature or contents of a media.""" + alt: String + + """The media content type.""" + mediaContentType: MediaContentType! + + """The preview image for the media.""" + previewImage: Image +} + +""" +An auto-generated type for paginating through multiple Media. + +""" +type MediaConnection { + """A list of edges.""" + edges: [MediaEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +"""The possible content types for a media object.""" +enum MediaContentType { + """An externally hosted video.""" + EXTERNAL_VIDEO + + """A Shopify hosted image.""" + IMAGE + + """A 3d model.""" + MODEL_3D + + """A Shopify hosted video.""" + VIDEO +} + +""" +An auto-generated type which holds one Media and a cursor during pagination. + +""" +type MediaEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of MediaEdge.""" + node: Media! +} + +"""Host for a Media Resource.""" +enum MediaHost { + """Host for YouTube embedded videos.""" + YOUTUBE + + """Host for Vimeo embedded videos.""" + VIMEO +} + +"""Represents a Shopify hosted image.""" +type MediaImage implements Node & Media { + """A word or phrase to share the nature or contents of a media.""" + alt: String + + """Globally unique identifier.""" + id: ID! + + """The image for the media.""" + image: Image + + """The media content type.""" + mediaContentType: MediaContentType! + + """The preview image for the media.""" + previewImage: Image +} + +""" +Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are +comprised of keys, values, and value types. + +""" +type Metafield implements Node { + """The date and time when the storefront metafield was created.""" + createdAt: DateTime! + + """The description of a metafield.""" + description: String + + """Globally unique identifier.""" + id: ID! + + """The key name for a metafield.""" + key: String! + + """The namespace for a metafield.""" + namespace: String! + + """The parent object that the metafield belongs to.""" + parentResource: MetafieldParentResource! + + """The date and time when the storefront metafield was updated.""" + updatedAt: DateTime! + + """The value of a metafield.""" + value: String! + + """Represents the metafield value type.""" + valueType: MetafieldValueType! +} + +""" +An auto-generated type for paginating through multiple Metafields. + +""" +type MetafieldConnection { + """A list of edges.""" + edges: [MetafieldEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Metafield and a cursor during pagination. + +""" +type MetafieldEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of MetafieldEdge.""" + node: Metafield! +} + +"""A resource that the metafield belongs to.""" +union MetafieldParentResource = Product | ProductVariant + +"""Metafield value types.""" +enum MetafieldValueType { + """A string metafield.""" + STRING + + """An integer metafield.""" + INTEGER + + """A json string metafield.""" + JSON_STRING +} + +"""Represents a Shopify hosted 3D model.""" +type Model3d implements Node & Media { + """A word or phrase to share the nature or contents of a media.""" + alt: String + + """Globally unique identifier.""" + id: ID! + + """The media content type.""" + mediaContentType: MediaContentType! + + """The preview image for the media.""" + previewImage: Image + + """The sources for a 3d model.""" + sources: [Model3dSource!]! +} + +"""Represents a source for a Shopify hosted 3d model.""" +type Model3dSource { + """The filesize of the 3d model.""" + filesize: Int! + + """The format of the 3d model.""" + format: String! + + """The MIME type of the 3d model.""" + mimeType: String! + + """The URL of the 3d model.""" + url: String! +} + +"""A monetary value string. Example value: `"100.57"`.""" +scalar Money + +"""Specifies the fields for a monetary value with currency.""" +input MoneyInput { + """Decimal money amount.""" + amount: Decimal! + + """Currency of the money.""" + currencyCode: CurrencyCode! +} + +""" +A monetary value with currency. + +To format currencies, combine this type's amount and currencyCode fields with your client's locale. + +For example, in JavaScript you could use Intl.NumberFormat: + +```js +new Intl.NumberFormat(locale, { + style: 'currency', + currency: currencyCode +}).format(amount); +``` + +Other formatting libraries include: + +* iOS - [NumberFormatter](https://developer.apple.com/documentation/foundation/numberformatter) +* Android - [NumberFormat](https://developer.android.com/reference/java/text/NumberFormat.html) +* PHP - [NumberFormatter](http://php.net/manual/en/class.numberformatter.php) + +For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations +(such as [TwitterCldr](https://github.com/twitter/twitter-cldr-rb)). + +""" +type MoneyV2 { + """Decimal money amount.""" + amount: Decimal! + + """Currency of the money.""" + currencyCode: CurrencyCode! +} + +""" +An auto-generated type for paginating through multiple MoneyV2s. + +""" +type MoneyV2Connection { + """A list of edges.""" + edges: [MoneyV2Edge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one MoneyV2 and a cursor during pagination. + +""" +type MoneyV2Edge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of MoneyV2Edge.""" + node: MoneyV2! +} + +""" +The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. +""" +type Mutation { + """Updates the attributes of a checkout.""" + checkoutAttributesUpdate( + """The ID of the checkout.""" + checkoutId: ID! + + """The fields used to update a checkout's attributes.""" + input: CheckoutAttributesUpdateInput! + ): CheckoutAttributesUpdatePayload @deprecated(reason: "Use `checkoutAttributesUpdateV2` instead") + + """Updates the attributes of a checkout.""" + checkoutAttributesUpdateV2( + """The ID of the checkout.""" + checkoutId: ID! + + """The checkout attributes to update.""" + input: CheckoutAttributesUpdateV2Input! + ): CheckoutAttributesUpdateV2Payload + + """ + Completes a checkout without providing payment information. You can use this + mutation for free items or items whose purchase price is covered by a gift card. + """ + checkoutCompleteFree( + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutCompleteFreePayload + + """Completes a checkout using a credit card token from Shopify's Vault.""" + checkoutCompleteWithCreditCard( + """The ID of the checkout.""" + checkoutId: ID! + + """The credit card info to apply as a payment.""" + payment: CreditCardPaymentInput! + ): CheckoutCompleteWithCreditCardPayload @deprecated(reason: "Use `checkoutCompleteWithCreditCardV2` instead") + + """ + Completes a checkout using a credit card token from Shopify's card vault. + Before you can complete checkouts using CheckoutCompleteWithCreditCardV2, you + need to [_request payment processing_](https://help.shopify.com/api/guides/sales-channel-sdk/getting-started#request-payment-processing). + """ + checkoutCompleteWithCreditCardV2( + """The ID of the checkout.""" + checkoutId: ID! + + """The credit card info to apply as a payment.""" + payment: CreditCardPaymentInputV2! + ): CheckoutCompleteWithCreditCardV2Payload + + """Completes a checkout with a tokenized payment.""" + checkoutCompleteWithTokenizedPayment( + """The ID of the checkout.""" + checkoutId: ID! + + """The info to apply as a tokenized payment.""" + payment: TokenizedPaymentInput! + ): CheckoutCompleteWithTokenizedPaymentPayload @deprecated(reason: "Use `checkoutCompleteWithTokenizedPaymentV2` instead") + + """Completes a checkout with a tokenized payment.""" + checkoutCompleteWithTokenizedPaymentV2( + """The ID of the checkout.""" + checkoutId: ID! + + """The info to apply as a tokenized payment.""" + payment: TokenizedPaymentInputV2! + ): CheckoutCompleteWithTokenizedPaymentV2Payload @deprecated(reason: "Use `checkoutCompleteWithTokenizedPaymentV3` instead") + + """Completes a checkout with a tokenized payment.""" + checkoutCompleteWithTokenizedPaymentV3( + """The ID of the checkout.""" + checkoutId: ID! + + """The info to apply as a tokenized payment.""" + payment: TokenizedPaymentInputV3! + ): CheckoutCompleteWithTokenizedPaymentV3Payload + + """Creates a new checkout.""" + checkoutCreate( + """The fields used to create a checkout.""" + input: CheckoutCreateInput! + ): CheckoutCreatePayload + + """Associates a customer to the checkout.""" + checkoutCustomerAssociate( + """The ID of the checkout.""" + checkoutId: ID! + + """The customer access token of the customer to associate.""" + customerAccessToken: String! + ): CheckoutCustomerAssociatePayload @deprecated(reason: "Use `checkoutCustomerAssociateV2` instead") + + """Associates a customer to the checkout.""" + checkoutCustomerAssociateV2( + """The ID of the checkout.""" + checkoutId: ID! + + """The customer access token of the customer to associate.""" + customerAccessToken: String! + ): CheckoutCustomerAssociateV2Payload + + """Disassociates the current checkout customer from the checkout.""" + checkoutCustomerDisassociate( + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutCustomerDisassociatePayload @deprecated(reason: "Use `checkoutCustomerDisassociateV2` instead") + + """Disassociates the current checkout customer from the checkout.""" + checkoutCustomerDisassociateV2( + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutCustomerDisassociateV2Payload + + """Applies a discount to an existing checkout using a discount code.""" + checkoutDiscountCodeApply( + """The discount code to apply to the checkout.""" + discountCode: String! + + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutDiscountCodeApplyPayload @deprecated(reason: "Use `checkoutDiscountCodeApplyV2` instead") + + """Applies a discount to an existing checkout using a discount code.""" + checkoutDiscountCodeApplyV2( + """The discount code to apply to the checkout.""" + discountCode: String! + + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutDiscountCodeApplyV2Payload + + """Removes the applied discount from an existing checkout.""" + checkoutDiscountCodeRemove( + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutDiscountCodeRemovePayload + + """Updates the email on an existing checkout.""" + checkoutEmailUpdate( + """The ID of the checkout.""" + checkoutId: ID! + + """The email to update the checkout with.""" + email: String! + ): CheckoutEmailUpdatePayload @deprecated(reason: "Use `checkoutEmailUpdateV2` instead") + + """Updates the email on an existing checkout.""" + checkoutEmailUpdateV2( + """The ID of the checkout.""" + checkoutId: ID! + + """The email to update the checkout with.""" + email: String! + ): CheckoutEmailUpdateV2Payload + + """ + Applies a gift card to an existing checkout using a gift card code. This will replace all currently applied gift cards. + """ + checkoutGiftCardApply( + """The code of the gift card to apply on the checkout.""" + giftCardCode: String! + + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutGiftCardApplyPayload @deprecated(reason: "Use `checkoutGiftCardsAppend` instead") + + """Removes an applied gift card from the checkout.""" + checkoutGiftCardRemove( + """The ID of the Applied Gift Card to remove from the Checkout.""" + appliedGiftCardId: ID! + + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutGiftCardRemovePayload @deprecated(reason: "Use `checkoutGiftCardRemoveV2` instead") + + """Removes an applied gift card from the checkout.""" + checkoutGiftCardRemoveV2( + """The ID of the Applied Gift Card to remove from the Checkout.""" + appliedGiftCardId: ID! + + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutGiftCardRemoveV2Payload + + """Appends gift cards to an existing checkout.""" + checkoutGiftCardsAppend( + """A list of gift card codes to append to the checkout.""" + giftCardCodes: [String!]! + + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutGiftCardsAppendPayload + + """Adds a list of line items to a checkout.""" + checkoutLineItemsAdd( + """A list of line item objects to add to the checkout.""" + lineItems: [CheckoutLineItemInput!]! + + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutLineItemsAddPayload + + """Removes line items from an existing checkout.""" + checkoutLineItemsRemove( + """The checkout on which to remove line items.""" + checkoutId: ID! + + """Line item ids to remove.""" + lineItemIds: [ID!]! + ): CheckoutLineItemsRemovePayload + + """Sets a list of line items to a checkout.""" + checkoutLineItemsReplace( + """A list of line item objects to set on the checkout.""" + lineItems: [CheckoutLineItemInput!]! + + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutLineItemsReplacePayload + + """Updates line items on a checkout.""" + checkoutLineItemsUpdate( + """The checkout on which to update line items.""" + checkoutId: ID! + + """Line items to update.""" + lineItems: [CheckoutLineItemUpdateInput!]! + ): CheckoutLineItemsUpdatePayload + + """Updates the shipping address of an existing checkout.""" + checkoutShippingAddressUpdate( + """The shipping address to where the line items will be shipped.""" + shippingAddress: MailingAddressInput! + + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutShippingAddressUpdatePayload @deprecated(reason: "Use `checkoutShippingAddressUpdateV2` instead") + + """Updates the shipping address of an existing checkout.""" + checkoutShippingAddressUpdateV2( + """The shipping address to where the line items will be shipped.""" + shippingAddress: MailingAddressInput! + + """The ID of the checkout.""" + checkoutId: ID! + ): CheckoutShippingAddressUpdateV2Payload + + """Updates the shipping lines on an existing checkout.""" + checkoutShippingLineUpdate( + """The ID of the checkout.""" + checkoutId: ID! + + """ + A unique identifier to a Checkout’s shipping provider, price, and title + combination, enabling the customer to select the availableShippingRates. + """ + shippingRateHandle: String! + ): CheckoutShippingLineUpdatePayload + + """ + Creates a customer access token. + The customer access token is required to modify the customer object in any way. + + """ + customerAccessTokenCreate( + """The fields used to create a customer access token.""" + input: CustomerAccessTokenCreateInput! + ): CustomerAccessTokenCreatePayload + + """ + Creates a customer access token using a multipass token instead of email and password. + A customer record is created if customer does not exist. If a customer record already + exists but the record is disabled, then it's enabled. + + """ + customerAccessTokenCreateWithMultipass( + """A valid multipass token to be authenticated.""" + multipassToken: String! + ): CustomerAccessTokenCreateWithMultipassPayload + + """Permanently destroys a customer access token.""" + customerAccessTokenDelete( + """The access token used to identify the customer.""" + customerAccessToken: String! + ): CustomerAccessTokenDeletePayload + + """ + Renews a customer access token. + + Access token renewal must happen *before* a token expires. + If a token has already expired, a new one should be created instead via `customerAccessTokenCreate`. + + """ + customerAccessTokenRenew( + """The access token used to identify the customer.""" + customerAccessToken: String! + ): CustomerAccessTokenRenewPayload + + """Activates a customer.""" + customerActivate( + """Specifies the customer to activate.""" + id: ID! + + """The fields used to activate a customer.""" + input: CustomerActivateInput! + ): CustomerActivatePayload + + """ + Activates a customer with the activation url received from `customerCreate`. + """ + customerActivateByUrl( + """The customer activation URL.""" + activationUrl: URL! + + """A new password set during activation.""" + password: String! + ): CustomerActivateByUrlPayload + + """Creates a new address for a customer.""" + customerAddressCreate( + """The access token used to identify the customer.""" + customerAccessToken: String! + + """The customer mailing address to create.""" + address: MailingAddressInput! + ): CustomerAddressCreatePayload + + """Permanently deletes the address of an existing customer.""" + customerAddressDelete( + """Specifies the address to delete.""" + id: ID! + + """The access token used to identify the customer.""" + customerAccessToken: String! + ): CustomerAddressDeletePayload + + """Updates the address of an existing customer.""" + customerAddressUpdate( + """The access token used to identify the customer.""" + customerAccessToken: String! + + """Specifies the customer address to update.""" + id: ID! + + """The customer’s mailing address.""" + address: MailingAddressInput! + ): CustomerAddressUpdatePayload + + """Creates a new customer.""" + customerCreate( + """The fields used to create a new customer.""" + input: CustomerCreateInput! + ): CustomerCreatePayload + + """Updates the default address of an existing customer.""" + customerDefaultAddressUpdate( + """The access token used to identify the customer.""" + customerAccessToken: String! + + """ID of the address to set as the new default for the customer.""" + addressId: ID! + ): CustomerDefaultAddressUpdatePayload + + """ + Sends a reset password email to the customer, as the first step in the reset password process. + """ + customerRecover( + """The email address of the customer to recover.""" + email: String! + ): CustomerRecoverPayload + + """ + Resets a customer’s password with a token received from `CustomerRecover`. + """ + customerReset( + """Specifies the customer to reset.""" + id: ID! + + """The fields used to reset a customer’s password.""" + input: CustomerResetInput! + ): CustomerResetPayload + + """ + Resets a customer’s password with the reset password url received from `CustomerRecover`. + """ + customerResetByUrl( + """The customer's reset password url.""" + resetUrl: URL! + + """New password that will be set as part of the reset password process.""" + password: String! + ): CustomerResetByUrlPayload + + """Updates an existing customer.""" + customerUpdate( + """The access token used to identify the customer.""" + customerAccessToken: String! + + """The customer object input.""" + customer: CustomerUpdateInput! + ): CustomerUpdatePayload +} + +"""An object with an ID to support global identification.""" +interface Node { + """Globally unique identifier.""" + id: ID! +} + +""" +An order is a customer’s completed request to purchase one or more products from +a shop. An order is created when a customer completes the checkout process, +during which time they provides an email address, billing address and payment information. +""" +type Order implements Node { + """ + The date and time when the order was canceled. Returns null if the order wasn't canceled. + """ + canceledAt: DateTime + + """ + The reason for the order's cancellation. Returns `null` if the order wasn't canceled. + """ + cancelReason: OrderCancelReason + + """The code of the currency used for the payment.""" + currencyCode: CurrencyCode! + + """ + The subtotal of line items and their discounts, excluding line items that have + been removed. Does not contain order-level discounts, duties, shipping costs, + or shipping discounts. Taxes are not included unless the order is a + taxes-included order. + """ + currentSubtotalPrice: MoneyV2! + + """The total cost of duties for the order, including refunds.""" + currentTotalDuties: MoneyV2 + + """ + The total amount of the order, including duties, taxes and discounts, minus amounts for line items that have been removed. + """ + currentTotalPrice: MoneyV2! + + """ + The total of all taxes applied to the order, excluding taxes for returned line items. + """ + currentTotalTax: MoneyV2! + + """The locale code in which this specific order happened.""" + customerLocale: String + + """The unique URL that the customer can use to access the order.""" + customerUrl: URL + + """Discounts that have been applied on the order.""" + discountApplications( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): DiscountApplicationConnection! + + """Whether the order has had any edits applied or not.""" + edited: Boolean! + + """The customer's email address.""" + email: String + + """The financial status of the order.""" + financialStatus: OrderFinancialStatus + + """The fulfillment status for the order.""" + fulfillmentStatus: OrderFulfillmentStatus! + + """Globally unique identifier.""" + id: ID! + + """List of the order’s line items.""" + lineItems( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): OrderLineItemConnection! + + """ + Unique identifier for the order that appears on the order. + For example, _#1000_ or _Store1001. + + """ + name: String! + + """ + A unique numeric identifier for the order for use by shop owner and customer. + """ + orderNumber: Int! + + """The total cost of duties charged at checkout.""" + originalTotalDuties: MoneyV2 + + """The total price of the order before any applied edits.""" + originalTotalPrice: MoneyV2! + + """The customer's phone number for receiving SMS notifications.""" + phone: String + + """ + The date and time when the order was imported. + This value can be set to dates in the past when importing from other systems. + If no value is provided, it will be auto-generated based on current date and time. + + """ + processedAt: DateTime! + + """The address to where the order will be shipped.""" + shippingAddress: MailingAddress + + """ + The discounts that have been allocated onto the shipping line by discount applications. + + """ + shippingDiscountAllocations: [DiscountAllocation!]! + + """The unique URL for the order's status page.""" + statusUrl: URL! + + """Price of the order before shipping and taxes.""" + subtotalPrice: Money @deprecated(reason: "Use `subtotalPriceV2` instead") + + """Price of the order before duties, shipping and taxes.""" + subtotalPriceV2: MoneyV2 + + """List of the order’s successful fulfillments.""" + successfulFulfillments( + """Truncate the array result to this size.""" + first: Int + ): [Fulfillment!] + + """ + The sum of all the prices of all the items in the order, taxes and discounts included (must be positive). + """ + totalPrice: Money! @deprecated(reason: "Use `totalPriceV2` instead") + + """ + The sum of all the prices of all the items in the order, duties, taxes and discounts included (must be positive). + """ + totalPriceV2: MoneyV2! + + """The total amount that has been refunded.""" + totalRefunded: Money! @deprecated(reason: "Use `totalRefundedV2` instead") + + """The total amount that has been refunded.""" + totalRefundedV2: MoneyV2! + + """The total cost of shipping.""" + totalShippingPrice: Money! @deprecated(reason: "Use `totalShippingPriceV2` instead") + + """The total cost of shipping.""" + totalShippingPriceV2: MoneyV2! + + """The total cost of taxes.""" + totalTax: Money @deprecated(reason: "Use `totalTaxV2` instead") + + """The total cost of taxes.""" + totalTaxV2: MoneyV2 +} + +"""Represents the reason for the order's cancellation.""" +enum OrderCancelReason { + """The customer wanted to cancel the order.""" + CUSTOMER + + """The order was fraudulent.""" + FRAUD + + """There was insufficient inventory.""" + INVENTORY + + """Payment was declined.""" + DECLINED + + """The order was canceled for an unlisted reason.""" + OTHER +} + +""" +An auto-generated type for paginating through multiple Orders. + +""" +type OrderConnection { + """A list of edges.""" + edges: [OrderEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Order and a cursor during pagination. + +""" +type OrderEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of OrderEdge.""" + node: Order! +} + +"""Represents the order's current financial status.""" +enum OrderFinancialStatus { + """Displayed as **Pending**.""" + PENDING + + """Displayed as **Authorized**.""" + AUTHORIZED + + """Displayed as **Partially paid**.""" + PARTIALLY_PAID + + """Displayed as **Partially refunded**.""" + PARTIALLY_REFUNDED + + """Displayed as **Voided**.""" + VOIDED + + """Displayed as **Paid**.""" + PAID + + """Displayed as **Refunded**.""" + REFUNDED +} + +"""Represents the order's current fulfillment status.""" +enum OrderFulfillmentStatus { + """Displayed as **Unfulfilled**.""" + UNFULFILLED + + """Displayed as **Partially fulfilled**.""" + PARTIALLY_FULFILLED + + """Displayed as **Fulfilled**.""" + FULFILLED + + """Displayed as **Restocked**.""" + RESTOCKED + + """Displayed as **Pending fulfillment**.""" + PENDING_FULFILLMENT + + """Displayed as **Open**.""" + OPEN + + """Displayed as **In progress**.""" + IN_PROGRESS + + """Displayed as **Scheduled**.""" + SCHEDULED +} + +""" +Represents a single line in an order. There is one line item for each distinct product variant. +""" +type OrderLineItem { + """ + The number of entries associated to the line item minus the items that have been removed. + """ + currentQuantity: Int! + + """List of custom attributes associated to the line item.""" + customAttributes: [Attribute!]! + + """ + The discounts that have been allocated onto the order line item by discount applications. + """ + discountAllocations: [DiscountAllocation!]! + + """ + The total price of the line item, including discounts, and displayed in the presentment currency. + """ + discountedTotalPrice: MoneyV2! + + """ + The total price of the line item, not including any discounts. The total price + is calculated using the original unit price multiplied by the quantity, and it + is displayed in the presentment currency. + """ + originalTotalPrice: MoneyV2! + + """The number of products variants associated to the line item.""" + quantity: Int! + + """The title of the product combined with title of the variant.""" + title: String! + + """The product variant object associated to the line item.""" + variant: ProductVariant +} + +""" +An auto-generated type for paginating through multiple OrderLineItems. + +""" +type OrderLineItemConnection { + """A list of edges.""" + edges: [OrderLineItemEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one OrderLineItem and a cursor during pagination. + +""" +type OrderLineItemEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of OrderLineItemEdge.""" + node: OrderLineItem! +} + +"""The set of valid sort keys for the Order query.""" +enum OrderSortKeys { + """Sort by the `processed_at` value.""" + PROCESSED_AT + + """Sort by the `total_price` value.""" + TOTAL_PRICE + + """Sort by the `id` value.""" + ID + + """ + During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the + results by relevance to the search term(s). When no search query is specified, this sort key is not + deterministic and should not be used. + + """ + RELEVANCE +} + +""" +Shopify merchants can create pages to hold static HTML content. Each Page object +represents a custom page on the online store. +""" +type Page implements Node { + """The description of the page, complete with HTML formatting.""" + body: HTML! + + """Summary of the page body.""" + bodySummary: String! + + """The timestamp of the page creation.""" + createdAt: DateTime! + + """ + A human-friendly unique string for the page automatically generated from its title. + """ + handle: String! + + """Globally unique identifier.""" + id: ID! + + """The page's SEO information.""" + seo: SEO + + """The title of the page.""" + title: String! + + """The timestamp of the latest page update.""" + updatedAt: DateTime! + + """The url pointing to the page accessible from the web.""" + url: URL! +} + +""" +An auto-generated type for paginating through multiple Pages. + +""" +type PageConnection { + """A list of edges.""" + edges: [PageEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Page and a cursor during pagination. + +""" +type PageEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of PageEdge.""" + node: Page! +} + +"""Information about pagination in a connection.""" +type PageInfo { + """Indicates if there are more pages to fetch.""" + hasNextPage: Boolean! + + """Indicates if there are any pages prior to the current page.""" + hasPreviousPage: Boolean! +} + +"""The set of valid sort keys for the Page query.""" +enum PageSortKeys { + """Sort by the `title` value.""" + TITLE + + """Sort by the `updated_at` value.""" + UPDATED_AT + + """Sort by the `id` value.""" + ID + + """ + During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the + results by relevance to the search term(s). When no search query is specified, this sort key is not + deterministic and should not be used. + + """ + RELEVANCE +} + +"""A payment applied to a checkout.""" +type Payment implements Node { + """The amount of the payment.""" + amount: Money! @deprecated(reason: "Use `amountV2` instead") + + """The amount of the payment.""" + amountV2: MoneyV2! + + """The billing address for the payment.""" + billingAddress: MailingAddress + + """The checkout to which the payment belongs.""" + checkout: Checkout! + + """The credit card used for the payment in the case of direct payments.""" + creditCard: CreditCard + + """ + A message describing a processing error during asynchronous processing. + """ + errorMessage: String + + """Globally unique identifier.""" + id: ID! + + """ + A client-side generated token to identify a payment and perform idempotent operations. + For more information, refer to + [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). + + """ + idempotencyKey: String + + """ + The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow. + """ + nextActionUrl: URL + + """Whether or not the payment is still processing asynchronously.""" + ready: Boolean! + + """ + A flag to indicate if the payment is to be done in test mode for gateways that support it. + """ + test: Boolean! + + """ + The actual transaction recorded by Shopify after having processed the payment with the gateway. + """ + transaction: Transaction +} + +"""Settings related to payments.""" +type PaymentSettings { + """List of the card brands which the shop accepts.""" + acceptedCardBrands: [CardBrand!]! + + """The url pointing to the endpoint to vault credit cards.""" + cardVaultUrl: URL! + + """The country where the shop is located.""" + countryCode: CountryCode! + + """The three-letter code for the shop's primary currency.""" + currencyCode: CurrencyCode! + + """ + A list of enabled currencies (ISO 4217 format) that the shop accepts. + Merchants can enable currencies from their Shopify Payments settings in the Shopify admin. + """ + enabledPresentmentCurrencies: [CurrencyCode!]! + + """The shop’s Shopify Payments account id.""" + shopifyPaymentsAccountId: String + + """List of the digital wallets which the shop supports.""" + supportedDigitalWallets: [DigitalWallet!]! +} + +"""The valid values for the types of payment token.""" +enum PaymentTokenType { + """Apple Pay token type.""" + APPLE_PAY + + """Vault payment token type.""" + VAULT + + """Shopify Pay token type.""" + SHOPIFY_PAY + + """Google Pay token type.""" + GOOGLE_PAY +} + +"""The value of the percentage pricing object.""" +type PricingPercentageValue { + """The percentage value of the object.""" + percentage: Float! +} + +"""The price value (fixed or percentage) for a discount application.""" +union PricingValue = MoneyV2 | PricingPercentageValue + +""" +A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. +For example, a digital download (such as a movie, music or ebook file) also +qualifies as a product, as do services (such as equipment rental, work for hire, +customization of another product or an extended warranty). +""" +type Product implements Node & HasMetafields { + """Indicates if at least one product variant is available for sale.""" + availableForSale: Boolean! + + """List of collections a product belongs to.""" + collections( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): CollectionConnection! + + """The compare at price of the product across all variants.""" + compareAtPriceRange: ProductPriceRange! + + """The date and time when the product was created.""" + createdAt: DateTime! + + """ + Stripped description of the product, single line with HTML tags removed. + """ + description( + """Truncates string after the given length.""" + truncateAt: Int + ): String! + + """The description of the product, complete with HTML formatting.""" + descriptionHtml: HTML! + + """ + A human-friendly unique string for the Product automatically generated from its title. + They are used by the Liquid templating language to refer to objects. + + """ + handle: String! + + """Globally unique identifier.""" + id: ID! + + """List of images associated with the product.""" + images( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: ProductImageSortKeys = POSITION + + """ + Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. + """ + maxWidth: Int + + """ + Image height in pixels between 1 and 2048. This argument is deprecated: Use + `maxHeight` on `Image.transformedSrc` instead. + """ + maxHeight: Int + + """ + Crops the image according to the specified region. This argument is + deprecated: Use `crop` on `Image.transformedSrc` instead. + """ + crop: CropRegion + + """ + Image size multiplier for high-resolution retina displays. Must be between 1 + and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. + """ + scale: Int = 1 + ): ImageConnection! + + """The media associated with the product.""" + media( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: ProductMediaSortKeys = POSITION + ): MediaConnection! + + """The metafield associated with the resource.""" + metafield( + """Container for a set of metafields (maximum of 20 characters).""" + namespace: String! + + """Identifier for the metafield (maximum of 30 characters).""" + key: String! + ): Metafield + + """A paginated list of metafields associated with the resource.""" + metafields( + """Container for a set of metafields (maximum of 20 characters).""" + namespace: String + + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """ + The online store URL for the product. + A value of `null` indicates that the product is not published to the Online Store sales channel. + + """ + onlineStoreUrl: URL + + """List of product options.""" + options( + """Truncate the array result to this size.""" + first: Int + ): [ProductOption!]! + + """List of price ranges in the presentment currencies for this shop.""" + presentmentPriceRanges( + """Specifies the presentment currencies to return a price range in.""" + presentmentCurrencies: [CurrencyCode!] + + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductPriceRangeConnection! + + """The price range.""" + priceRange: ProductPriceRange! + + """ + A categorization that a product can be tagged with, commonly used for filtering and searching. + """ + productType: String! + + """The date and time when the product was published to the channel.""" + publishedAt: DateTime! + + """The product's SEO information.""" + seo: SEO! + + """ + A comma separated list of tags that have been added to the product. + Additional access scope required for private apps: unauthenticated_read_product_tags. + + """ + tags: [String!]! + + """The product’s title.""" + title: String! + + """The total quantity of inventory in stock for this Product.""" + totalInventory: Int + + """ + The date and time when the product was last modified. + A product's `updatedAt` value can change for different reasons. For example, if an order + is placed for a product that has inventory tracking set up, then the inventory adjustment + is counted as an update. + + """ + updatedAt: DateTime! + + """ + Find a product’s variant based on its selected options. + This is useful for converting a user’s selection of product options into a single matching variant. + If there is not a variant for the selected options, `null` will be returned. + + """ + variantBySelectedOptions( + """The input fields used for a selected option.""" + selectedOptions: [SelectedOptionInput!]! + ): ProductVariant + + """List of the product’s variants.""" + variants( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: ProductVariantSortKeys = POSITION + ): ProductVariantConnection! + + """The product’s vendor name.""" + vendor: String! +} + +"""The set of valid sort keys for the ProductCollection query.""" +enum ProductCollectionSortKeys { + """Sort by the `title` value.""" + TITLE + + """Sort by the `price` value.""" + PRICE + + """Sort by the `best-selling` value.""" + BEST_SELLING + + """Sort by the `created` value.""" + CREATED + + """Sort by the `id` value.""" + ID + + """Sort by the `manual` value.""" + MANUAL + + """Sort by the `collection-default` value.""" + COLLECTION_DEFAULT + + """ + During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the + results by relevance to the search term(s). When no search query is specified, this sort key is not + deterministic and should not be used. + + """ + RELEVANCE +} + +""" +An auto-generated type for paginating through multiple Products. + +""" +type ProductConnection { + """A list of edges.""" + edges: [ProductEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one Product and a cursor during pagination. + +""" +type ProductEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of ProductEdge.""" + node: Product! +} + +"""The set of valid sort keys for the ProductImage query.""" +enum ProductImageSortKeys { + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `position` value.""" + POSITION + + """Sort by the `id` value.""" + ID + + """ + During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the + results by relevance to the search term(s). When no search query is specified, this sort key is not + deterministic and should not be used. + + """ + RELEVANCE +} + +"""The set of valid sort keys for the ProductMedia query.""" +enum ProductMediaSortKeys { + """Sort by the `position` value.""" + POSITION + + """Sort by the `id` value.""" + ID + + """ + During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the + results by relevance to the search term(s). When no search query is specified, this sort key is not + deterministic and should not be used. + + """ + RELEVANCE +} + +""" +Product property names like "Size", "Color", and "Material" that the customers can select. +Variants are selected based on permutations of these options. +255 characters limit each. + +""" +type ProductOption implements Node { + """Globally unique identifier.""" + id: ID! + + """The product option’s name.""" + name: String! + + """The corresponding value to the product option name.""" + values: [String!]! +} + +"""The price range of the product.""" +type ProductPriceRange { + """The highest variant's price.""" + maxVariantPrice: MoneyV2! + + """The lowest variant's price.""" + minVariantPrice: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple ProductPriceRanges. + +""" +type ProductPriceRangeConnection { + """A list of edges.""" + edges: [ProductPriceRangeEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductPriceRange and a cursor during pagination. + +""" +type ProductPriceRangeEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of ProductPriceRangeEdge.""" + node: ProductPriceRange! +} + +"""The set of valid sort keys for the Product query.""" +enum ProductSortKeys { + """Sort by the `title` value.""" + TITLE + + """Sort by the `product_type` value.""" + PRODUCT_TYPE + + """Sort by the `vendor` value.""" + VENDOR + + """Sort by the `updated_at` value.""" + UPDATED_AT + + """Sort by the `created_at` value.""" + CREATED_AT + + """Sort by the `best_selling` value.""" + BEST_SELLING + + """Sort by the `price` value.""" + PRICE + + """Sort by the `id` value.""" + ID + + """ + During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the + results by relevance to the search term(s). When no search query is specified, this sort key is not + deterministic and should not be used. + + """ + RELEVANCE +} + +""" +A product variant represents a different version of a product, such as differing sizes or differing colors. +""" +type ProductVariant implements Node & HasMetafields { + """Indicates if the product variant is in stock.""" + available: Boolean @deprecated(reason: "Use `availableForSale` instead") + + """Indicates if the product variant is available for sale.""" + availableForSale: Boolean! + + """ + The compare at price of the variant. This can be used to mark a variant as on + sale, when `compareAtPrice` is higher than `price`. + """ + compareAtPrice: Money @deprecated(reason: "Use `compareAtPriceV2` instead") + + """ + The compare at price of the variant. This can be used to mark a variant as on + sale, when `compareAtPriceV2` is higher than `priceV2`. + """ + compareAtPriceV2: MoneyV2 + + """ + Whether a product is out of stock but still available for purchase (used for backorders). + """ + currentlyNotInStock: Boolean! + + """Globally unique identifier.""" + id: ID! + + """ + Image associated with the product variant. This field falls back to the product image if no image is available. + """ + image( + """ + Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. + """ + maxWidth: Int + + """ + Image height in pixels between 1 and 2048. This argument is deprecated: Use + `maxHeight` on `Image.transformedSrc` instead. + """ + maxHeight: Int + + """ + Crops the image according to the specified region. This argument is + deprecated: Use `crop` on `Image.transformedSrc` instead. + """ + crop: CropRegion + + """ + Image size multiplier for high-resolution retina displays. Must be between 1 + and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. + """ + scale: Int = 1 + ): Image + + """The metafield associated with the resource.""" + metafield( + """Container for a set of metafields (maximum of 20 characters).""" + namespace: String! + + """Identifier for the metafield (maximum of 30 characters).""" + key: String! + ): Metafield + + """A paginated list of metafields associated with the resource.""" + metafields( + """Container for a set of metafields (maximum of 20 characters).""" + namespace: String + + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MetafieldConnection! + + """ + List of prices and compare-at prices in the presentment currencies for this shop. + """ + presentmentPrices( + """The presentment currencies prices should return in.""" + presentmentCurrencies: [CurrencyCode!] + + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): ProductVariantPricePairConnection! + + """List of unit prices in the presentment currencies for this shop.""" + presentmentUnitPrices( + """Specify the currencies in which to return presentment unit prices.""" + presentmentCurrencies: [CurrencyCode!] + + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + ): MoneyV2Connection! + + """The product variant’s price.""" + price: Money! @deprecated(reason: "Use `priceV2` instead") + + """The product variant’s price.""" + priceV2: MoneyV2! + + """The product object that the product variant belongs to.""" + product: Product! + + """The total sellable quantity of the variant for online sales channels.""" + quantityAvailable: Int + + """ + Whether a customer needs to provide a shipping address when placing an order for the product variant. + """ + requiresShipping: Boolean! + + """List of product options applied to the variant.""" + selectedOptions: [SelectedOption!]! + + """The SKU (stock keeping unit) associated with the variant.""" + sku: String + + """The product variant’s title.""" + title: String! + + """ + The unit price value for the variant based on the variant's measurement. + """ + unitPrice: MoneyV2 + + """The unit price measurement for the variant.""" + unitPriceMeasurement: UnitPriceMeasurement + + """ + The weight of the product variant in the unit system specified with `weight_unit`. + """ + weight: Float + + """Unit of measurement for weight.""" + weightUnit: WeightUnit! +} + +""" +An auto-generated type for paginating through multiple ProductVariants. + +""" +type ProductVariantConnection { + """A list of edges.""" + edges: [ProductVariantEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariant and a cursor during pagination. + +""" +type ProductVariantEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of ProductVariantEdge.""" + node: ProductVariant! +} + +""" +The compare-at price and price of a variant sharing a currency. + +""" +type ProductVariantPricePair { + """The compare-at price of the variant with associated currency.""" + compareAtPrice: MoneyV2 + + """The price of the variant with associated currency.""" + price: MoneyV2! +} + +""" +An auto-generated type for paginating through multiple ProductVariantPricePairs. + +""" +type ProductVariantPricePairConnection { + """A list of edges.""" + edges: [ProductVariantPricePairEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination. + +""" +type ProductVariantPricePairEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of ProductVariantPricePairEdge.""" + node: ProductVariantPricePair! +} + +"""The set of valid sort keys for the ProductVariant query.""" +enum ProductVariantSortKeys { + """Sort by the `title` value.""" + TITLE + + """Sort by the `sku` value.""" + SKU + + """Sort by the `position` value.""" + POSITION + + """Sort by the `id` value.""" + ID + + """ + During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the + results by relevance to the search term(s). When no search query is specified, this sort key is not + deterministic and should not be used. + + """ + RELEVANCE +} + +""" +The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. +""" +type QueryRoot { + """List of the shop's articles.""" + articles( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: ArticleSortKeys = ID + + """ + Supported filter parameters: + - `author` + - `blog_title` + - `created_at` + - `tag` + - `updated_at` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): ArticleConnection! + + """Find a blog by its handle.""" + blogByHandle( + """The handle of the blog.""" + handle: String! + ): Blog + + """List of the shop's blogs.""" + blogs( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: BlogSortKeys = ID + + """ + Supported filter parameters: + - `created_at` + - `handle` + - `title` + - `updated_at` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): BlogConnection! + + """Find a collection by its handle.""" + collectionByHandle( + """The handle of the collection.""" + handle: String! + ): Collection + + """List of the shop’s collections.""" + collections( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CollectionSortKeys = ID + + """ + Supported filter parameters: + - `collection_type` + - `title` + - `updated_at` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): CollectionConnection! + + """Find a customer by its access token.""" + customer( + """The customer access token.""" + customerAccessToken: String! + ): Customer + + """Returns a specific node by ID.""" + node( + """The ID of the Node to return.""" + id: ID! + ): Node + + """Returns the list of nodes with the given IDs.""" + nodes( + """The IDs of the Nodes to return.""" + ids: [ID!]! + ): [Node]! + + """Find a page by its handle.""" + pageByHandle( + """The handle of the page.""" + handle: String! + ): Page + + """List of the shop's pages.""" + pages( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: PageSortKeys = ID + + """ + Supported filter parameters: + - `created_at` + - `handle` + - `title` + - `updated_at` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): PageConnection! + + """Find a product by its handle.""" + productByHandle( + """The handle of the product.""" + handle: String! + ): Product + + """ + Find recommended products related to a given `product_id`. + To learn more about how recommendations are generated, see + [*Showing product recommendations on product pages*](https://help.shopify.com/themes/development/recommended-products). + + """ + productRecommendations( + """The id of the product.""" + productId: ID! + ): [Product!] + + """List of the shop’s products.""" + products( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: ProductSortKeys = ID + + """ + Supported filter parameters: + - `available_for_sale` + - `created_at` + - `product_type` + - `tag` + - `title` + - `updated_at` + - `variants.price` + - `vendor` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): ProductConnection! + + """ + Tags added to products. + Additional access scope required: unauthenticated_read_product_tags. + + """ + productTags( + """Returns up to the first `n` elements from the list.""" + first: Int! + ): StringConnection! + + """ + List of product types for the shop's products that are published to your app. + """ + productTypes( + """Returns up to the first `n` elements from the list.""" + first: Int! + ): StringConnection! + + """ + The list of public Storefront API versions, including supported, release candidate and unstable versions. + """ + publicApiVersions: [ApiVersion!]! + + """The shop associated with the storefront access token.""" + shop: Shop! +} + +""" +Script discount applications capture the intentions of a discount that +was created by a Shopify Script. + +""" +type ScriptDiscountApplication implements DiscountApplication { + """ + The method by which the discount's value is allocated to its entitled items. + """ + allocationMethod: DiscountApplicationAllocationMethod! + + """The description of the application as defined by the Script.""" + description: String! @deprecated(reason: "Use `title` instead") + + """Which lines of targetType that the discount is allocated over.""" + targetSelection: DiscountApplicationTargetSelection! + + """The type of line that the discount is applicable towards.""" + targetType: DiscountApplicationTargetType! + + """The title of the application as defined by the Script.""" + title: String! + + """The value of the discount application.""" + value: PricingValue! +} + +""" +Properties used by customers to select a product variant. +Products can have multiple options, like different sizes or colors. + +""" +type SelectedOption { + """The product option’s name.""" + name: String! + + """The product option’s value.""" + value: String! +} + +"""Specifies the input fields required for a selected option.""" +input SelectedOptionInput { + """The product option’s name.""" + name: String! + + """The product option’s value.""" + value: String! +} + +"""SEO information.""" +type SEO { + """The meta description.""" + description: String + + """The SEO title.""" + title: String +} + +"""A shipping rate to be applied to a checkout.""" +type ShippingRate { + """Human-readable unique identifier for this shipping rate.""" + handle: String! + + """Price of this shipping rate.""" + price: Money! @deprecated(reason: "Use `priceV2` instead") + + """Price of this shipping rate.""" + priceV2: MoneyV2! + + """Title of this shipping rate.""" + title: String! +} + +""" +Shop represents a collection of the general settings and information about the shop. +""" +type Shop { + """List of the shop' articles.""" + articles( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: ArticleSortKeys = ID + + """ + Supported filter parameters: + - `author` + - `blog_title` + - `created_at` + - `tag` + - `updated_at` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): ArticleConnection! @deprecated(reason: "Use `QueryRoot.articles` instead.") + + """List of the shop' blogs.""" + blogs( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: BlogSortKeys = ID + + """ + Supported filter parameters: + - `created_at` + - `handle` + - `title` + - `updated_at` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): BlogConnection! @deprecated(reason: "Use `QueryRoot.blogs` instead.") + + """Find a collection by its handle.""" + collectionByHandle( + """The handle of the collection.""" + handle: String! + ): Collection @deprecated(reason: "Use `QueryRoot.collectionByHandle` instead.") + + """List of the shop’s collections.""" + collections( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: CollectionSortKeys = ID + + """ + Supported filter parameters: + - `collection_type` + - `title` + - `updated_at` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): CollectionConnection! @deprecated(reason: "Use `QueryRoot.collections` instead.") + + """The three-letter code for the currency that the shop accepts.""" + currencyCode: CurrencyCode! @deprecated(reason: "Use `paymentSettings` instead") + + """A description of the shop.""" + description: String + + """ + A string representing the way currency is formatted when the currency isn’t specified. + """ + moneyFormat: String! + + """The shop’s name.""" + name: String! + + """Settings related to payments.""" + paymentSettings: PaymentSettings! + + """The shop’s primary domain.""" + primaryDomain: Domain! + + """The shop’s privacy policy.""" + privacyPolicy: ShopPolicy + + """Find a product by its handle.""" + productByHandle( + """The handle of the product.""" + handle: String! + ): Product @deprecated(reason: "Use `QueryRoot.productByHandle` instead.") + + """List of the shop’s products.""" + products( + """Returns up to the first `n` elements from the list.""" + first: Int + + """Returns the elements that come after the specified cursor.""" + after: String + + """Returns up to the last `n` elements from the list.""" + last: Int + + """Returns the elements that come before the specified cursor.""" + before: String + + """Reverse the order of the underlying list.""" + reverse: Boolean = false + + """Sort the underlying list by the given key.""" + sortKey: ProductSortKeys = ID + + """ + Supported filter parameters: + - `available_for_sale` + - `created_at` + - `product_type` + - `tag` + - `title` + - `updated_at` + - `variants.price` + - `vendor` + + See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) + for more information about using filters. + + """ + query: String + ): ProductConnection! @deprecated(reason: "Use `QueryRoot.products` instead.") + + """ + A list of tags that have been added to products. + Additional access scope required: unauthenticated_read_product_tags. + + """ + productTags( + """Returns up to the first `n` elements from the list.""" + first: Int! + ): StringConnection! @deprecated(reason: "Use `QueryRoot.productTags` instead.") + + """List of the shop’s product types.""" + productTypes( + """Returns up to the first `n` elements from the list.""" + first: Int! + ): StringConnection! @deprecated(reason: "Use `QueryRoot.productTypes` instead.") + + """The shop’s refund policy.""" + refundPolicy: ShopPolicy + + """The shop’s shipping policy.""" + shippingPolicy: ShopPolicy + + """Countries that the shop ships to.""" + shipsToCountries: [CountryCode!]! + + """The shop’s Shopify Payments account id.""" + shopifyPaymentsAccountId: String @deprecated(reason: "Use `paymentSettings` instead") + + """The shop’s terms of service.""" + termsOfService: ShopPolicy +} + +""" +Policy that a merchant has configured for their store, such as their refund or privacy policy. +""" +type ShopPolicy implements Node { + """Policy text, maximum size of 64kb.""" + body: String! + + """Policy’s handle.""" + handle: String! + + """Globally unique identifier.""" + id: ID! + + """Policy’s title.""" + title: String! + + """Public URL to the policy.""" + url: URL! +} + +""" +An auto-generated type for paginating through multiple Strings. + +""" +type StringConnection { + """A list of edges.""" + edges: [StringEdge!]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! +} + +""" +An auto-generated type which holds one String and a cursor during pagination. + +""" +type StringEdge { + """A cursor for use in pagination.""" + cursor: String! + + """The item at the end of StringEdge.""" + node: String! +} + +""" +Specifies the fields required to complete a checkout with +a tokenized payment. + +""" +input TokenizedPaymentInput { + """The amount of the payment.""" + amount: Money! + + """ + A unique client generated key used to avoid duplicate charges. When a + duplicate payment is found, the original is returned instead of creating a new + one. For more information, refer to [Idempotent + requests](https://shopify.dev/concepts/about-apis/idempotent-requests). + """ + idempotencyKey: String! + + """The billing address for the payment.""" + billingAddress: MailingAddressInput! + + """The type of payment token.""" + type: String! + + """ + A simple string or JSON containing the required payment data for the tokenized payment. + """ + paymentData: String! + + """Executes the payment in test mode if possible. Defaults to `false`.""" + test: Boolean = false + + """Public Hash Key used for AndroidPay payments only.""" + identifier: String +} + +""" +Specifies the fields required to complete a checkout with +a tokenized payment. + +""" +input TokenizedPaymentInputV2 { + """The amount and currency of the payment.""" + paymentAmount: MoneyInput! + + """ + A unique client generated key used to avoid duplicate charges. When a + duplicate payment is found, the original is returned instead of creating a new + one. For more information, refer to [Idempotent + requests](https://shopify.dev/concepts/about-apis/idempotent-requests). + """ + idempotencyKey: String! + + """The billing address for the payment.""" + billingAddress: MailingAddressInput! + + """ + A simple string or JSON containing the required payment data for the tokenized payment. + """ + paymentData: String! + + """ + Whether to execute the payment in test mode, if possible. Test mode is not + supported in production stores. Defaults to `false`. + """ + test: Boolean = false + + """Public Hash Key used for AndroidPay payments only.""" + identifier: String + + """The type of payment token.""" + type: String! +} + +""" +Specifies the fields required to complete a checkout with +a tokenized payment. + +""" +input TokenizedPaymentInputV3 { + """The amount and currency of the payment.""" + paymentAmount: MoneyInput! + + """ + A unique client generated key used to avoid duplicate charges. When a + duplicate payment is found, the original is returned instead of creating a new + one. For more information, refer to [Idempotent + requests](https://shopify.dev/concepts/about-apis/idempotent-requests). + """ + idempotencyKey: String! + + """The billing address for the payment.""" + billingAddress: MailingAddressInput! + + """ + A simple string or JSON containing the required payment data for the tokenized payment. + """ + paymentData: String! + + """ + Whether to execute the payment in test mode, if possible. Test mode is not + supported in production stores. Defaults to `false`. + """ + test: Boolean = false + + """Public Hash Key used for AndroidPay payments only.""" + identifier: String + + """The type of payment token.""" + type: PaymentTokenType! +} + +"""An object representing exchange of money for a product or service.""" +type Transaction { + """The amount of money that the transaction was for.""" + amount: Money! @deprecated(reason: "Use `amountV2` instead") + + """The amount of money that the transaction was for.""" + amountV2: MoneyV2! + + """The kind of the transaction.""" + kind: TransactionKind! + + """The status of the transaction.""" + status: TransactionStatus! @deprecated(reason: "Use `statusV2` instead") + + """The status of the transaction.""" + statusV2: TransactionStatus + + """Whether the transaction was done in test mode or not.""" + test: Boolean! +} + +"""The different kinds of order transactions.""" +enum TransactionKind { + """An authorization and capture performed together in a single step.""" + SALE + + """ + A transfer of the money that was reserved during the authorization stage. + """ + CAPTURE + + """ + An amount reserved against the cardholder's funding source. + Money does not change hands until the authorization is captured. + + """ + AUTHORIZATION + + """An authorization for a payment taken with an EMV credit card reader.""" + EMV_AUTHORIZATION + + """Money returned to the customer when they have paid too much.""" + CHANGE +} + +"""Transaction statuses describe the status of a transaction.""" +enum TransactionStatus { + """The transaction is pending.""" + PENDING + + """The transaction succeeded.""" + SUCCESS + + """The transaction failed.""" + FAILURE + + """There was an error while processing the transaction.""" + ERROR +} + +""" +The measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). + +""" +type UnitPriceMeasurement { + """The type of unit of measurement for the unit price measurement.""" + measuredType: UnitPriceMeasurementMeasuredType + + """The quantity unit for the unit price measurement.""" + quantityUnit: UnitPriceMeasurementMeasuredUnit + + """The quantity value for the unit price measurement.""" + quantityValue: Float! + + """The reference unit for the unit price measurement.""" + referenceUnit: UnitPriceMeasurementMeasuredUnit + + """The reference value for the unit price measurement.""" + referenceValue: Int! +} + +"""The accepted types of unit of measurement.""" +enum UnitPriceMeasurementMeasuredType { + """Unit of measurements representing volumes.""" + VOLUME + + """Unit of measurements representing weights.""" + WEIGHT + + """Unit of measurements representing lengths.""" + LENGTH + + """Unit of measurements representing areas.""" + AREA +} + +"""The valid units of measurement for a unit price measurement.""" +enum UnitPriceMeasurementMeasuredUnit { + """1000 milliliters equals 1 liter.""" + ML + + """100 centiliters equals 1 liter.""" + CL + + """Metric system unit of volume.""" + L + + """1 cubic meter equals 1000 liters.""" + M3 + + """1000 milligrams equals 1 gram.""" + MG + + """Metric system unit of weight.""" + G + + """1 kilogram equals 1000 grams.""" + KG + + """1000 millimeters equals 1 meter.""" + MM + + """100 centimeters equals 1 meter.""" + CM + + """Metric system unit of length.""" + M + + """Metric system unit of area.""" + M2 +} + +""" +An RFC 3986 and RFC 3987 compliant URI string. + +Example value: `"https://johns-apparel.myshopify.com"`. + +""" +scalar URL + +"""Represents an error in the input of a mutation.""" +type UserError implements DisplayableError { + """Path to the input field which caused the error.""" + field: [String!] + + """The error message.""" + message: String! +} + +"""Represents a Shopify hosted video.""" +type Video implements Node & Media { + """A word or phrase to share the nature or contents of a media.""" + alt: String + + """Globally unique identifier.""" + id: ID! + + """The media content type.""" + mediaContentType: MediaContentType! + + """The preview image for the media.""" + previewImage: Image + + """The sources for a video.""" + sources: [VideoSource!]! +} + +"""Represents a source for a Shopify hosted video.""" +type VideoSource { + """The format of the video source.""" + format: String! + + """The height of the video.""" + height: Int! + + """The video MIME type.""" + mimeType: String! + + """The URL of the video.""" + url: String! + + """The width of the video.""" + width: Int! +} + +"""Units of measurement for weight.""" +enum WeightUnit { + """1 kilogram equals 1000 grams.""" + KILOGRAMS + + """Metric system unit of mass.""" + GRAMS + + """1 pound equals 16 ounces.""" + POUNDS + + """Imperial system unit of mass.""" + OUNCES +} diff --git a/example/shopify/unions.md b/example/shopify/unions.md new file mode 100644 index 0000000000000..eaa06fa82bbbd --- /dev/null +++ b/example/shopify/unions.md @@ -0,0 +1,29 @@ +# Unions + +### About unions + +A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type of object representing many objects. + +### MetafieldParentResource + +

A resource that the metafield belongs to.

+ +### Possible types + + +- [Product](objects.md#product) +- [ProductVariant](objects.md#productvariant) + +--- + +### PricingValue + +

The price value (fixed or percentage) for a discount application.

+ +### Possible types + + +- [MoneyV2](objects.md#moneyv2) +- [PricingPercentageValue](objects.md#pricingpercentagevalue) + +--- \ No newline at end of file diff --git a/go.mod b/go.mod index c2a9ac19bb3b4..6e6b1f45a46cb 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.16 require ( github.com/99designs/gqlgen v0.13.0 + github.com/google/go-cmp v0.5.5 github.com/machinebox/graphql v0.2.2 github.com/matryer/is v1.4.0 // indirect github.com/mattn/go-zglob v0.0.3 diff --git a/go.sum b/go.sum index 7b66022a7b953..b0521817590e2 100644 --- a/go.sum +++ b/go.sum @@ -17,6 +17,8 @@ github.com/dgryski/trifles v0.0.0-20190318185328-a8d75aae118c h1:TUuUh0Xgj97tLMN github.com/dgryski/trifles v0.0.0-20190318185328-a8d75aae118c/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/go-chi/chi v3.3.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -77,6 +79,8 @@ golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/gqlgen/gqlgen.go b/internal/gqlgen/gqlgen.go index 1a50867e8e0de..c067ff6fc5f51 100644 --- a/internal/gqlgen/gqlgen.go +++ b/internal/gqlgen/gqlgen.go @@ -1,11 +1,11 @@ -// Almost Code generated by github.com/99designs/gqlgen package gqlgen import ( "bytes" "context" - "errors" + "fmt" "io/ioutil" + "reflect" "strconv" "sync" @@ -15,9 +15,6 @@ import ( "github.com/vektah/gqlparser/v2/ast" ) -// region ************************** generated!.gotpl ************************** - -// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. func NewExecutableSchema(filenames ...string) (graphql.ExecutableSchema, error) { sources := make([]*ast.Source, len(filenames)) for i, filename := range filenames { @@ -70,31 +67,20 @@ type executionContext struct { *executableSchema } -func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { - if ec.DisableIntrospection { - return nil, errors.New("introspection disabled") - } - return introspection.WrapSchema(ec.parsedSchema), nil +func (ec *executionContext) introspectSchema() *introspection.Schema { + return introspection.WrapSchema(ec.parsedSchema) } -func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { - if ec.DisableIntrospection { - return nil, errors.New("introspection disabled") - } - return introspection.WrapTypeFromDef(ec.parsedSchema, ec.parsedSchema.Types[name]), nil +func (ec *executionContext) introspectType(name string) *introspection.Type { + return introspection.WrapTypeFromDef(ec.parsedSchema, ec.parsedSchema.Types[name]) } -// endregion ************************** generated!.gotpl ************************** - -// region ***************************** args.gotpl ***************************** - func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 string if tmp, ok := rawArgs["name"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - arg0, err = ec.unmarshalNString2string(ctx, tmp) + arg0, err = graphql.UnmarshalString(tmp) if err != nil { return nil, err } @@ -108,8 +94,7 @@ func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, ra args := map[string]interface{}{} var arg0 bool if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + arg0, err = graphql.UnmarshalBoolean(tmp) if err != nil { return nil, err } @@ -123,8 +108,7 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg args := map[string]interface{}{} var arg0 bool if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) - arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + arg0, err = graphql.UnmarshalBoolean(tmp) if err != nil { return nil, err } @@ -133,1189 +117,221 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg return args, nil } -// endregion ***************************** args.gotpl ***************************** - -// region ************************** directives.gotpl ************************** - -// endregion ************************** directives.gotpl ************************** - -// region **************************** field.gotpl ***************************** - func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field_Query___type_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - fc.Args = args - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.introspectType(args["name"].(string)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + + res := ec.introspectType(args["name"].(string)) + return ec.marshalType(ctx, field.Selections, res) } func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "Query", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.introspectSchema() - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*introspection.Schema) - fc.Result = res - return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) + res := ec.introspectSchema() + return ec.___Schema(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Name, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + res := obj.Name + return graphql.MarshalString(res) } func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Description, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + res := obj.Description + return graphql.MarshalString(res) } func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Locations, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]string) - fc.Result = res - return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) + res := obj.Locations + return ec.marshalArray(ctx, field.Selections, res) } func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Directive", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Args, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.InputValue) - fc.Result = res - return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + res := obj.Args + return ec.marshalArray(ctx, field.Selections, res) } func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__EnumValue", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Name, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + res := obj.Name + return graphql.MarshalString(res) } func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__EnumValue", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Description, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + res := obj.Description + return graphql.MarshalString(res) } func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__EnumValue", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsDeprecated(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + res := obj.IsDeprecated() + return graphql.MarshalBoolean(res) } func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__EnumValue", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.DeprecationReason(), nil - }) - if err != nil { - ec.Error(ctx, err) + res := obj.DeprecationReason() + if res == nil { return graphql.Null } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.MarshalString(*res) } func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Name, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + res := obj.Name + return graphql.MarshalString(res) } func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Description, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + res := obj.Description + return graphql.MarshalString(res) } func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Args, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.InputValue) - fc.Result = res - return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + res := obj.Args + return ec.marshalArray(ctx, field.Selections, res) } func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Type, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } + res := obj.Type + if res == nil { return graphql.Null } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.___Type(ctx, field.Selections, res) } func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsDeprecated(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + res := obj.IsDeprecated() + return graphql.MarshalBoolean(res) } func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Field", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.DeprecationReason(), nil - }) - if err != nil { - ec.Error(ctx, err) + res := obj.DeprecationReason() + if res == nil { return graphql.Null } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.MarshalString(*res) } func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Name, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + res := obj.Name + return graphql.MarshalString(res) } func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Description, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + res := obj.Description + return graphql.MarshalString(res) } func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Type, nil - }) - if err != nil { - ec.Error(ctx, err) + res := obj.Type + if res == nil { return graphql.Null } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.___Type(ctx, field.Selections, res) } func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__InputValue", - Field: field, - Args: nil, - IsMethod: false, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.DefaultValue, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { + res := obj.DefaultValue + if res == nil { return graphql.Null } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.MarshalString(*res) } func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Types(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.Type) - fc.Result = res - return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + res := obj.Types() + return ec.marshalArray(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.QueryType(), nil - }) - if err != nil { - ec.Error(ctx, err) + res := obj.QueryType() + if res == nil { return graphql.Null } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.___Type(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.MutationType(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + res := obj.MutationType() + return ec.marshalType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.SubscriptionType(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + res := obj.SubscriptionType() + return ec.marshalType(ctx, field.Selections, res) } func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Schema", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Directives(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.Directive) - fc.Result = res - return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) + res := obj.Directives() + return ec.marshalArray(ctx, field.Selections, res) } func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Kind(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalN__TypeKind2string(ctx, field.Selections, res) + res := obj.Kind() + return graphql.MarshalString(res) } func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Name(), nil - }) - if err != nil { - ec.Error(ctx, err) + res := obj.Name() + if res == nil { return graphql.Null } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return graphql.MarshalString(*res) } func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Description(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(string) - fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + res := obj.Description() + return graphql.MarshalString(res) } func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - fc.Args = args - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Fields(args["includeDeprecated"].(bool)), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]introspection.Field) - fc.Result = res - return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) + + res := obj.Fields(args["includeDeprecated"].(bool)) + return ec.marshalArray(ctx, field.Selections, res) } func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Interfaces(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + res := obj.Interfaces() + return ec.marshalArray(ctx, field.Selections, res) } func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.PossibleTypes(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + res := obj.PossibleTypes() + return ec.marshalArray(ctx, field.Selections, res) } func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) rawArgs := field.ArgumentMap(ec.Variables) args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } - fc.Args = args - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.EnumValues(args["includeDeprecated"].(bool)), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]introspection.EnumValue) - fc.Result = res - return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) -} - -func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.InputFields(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]introspection.InputValue) - fc.Result = res - return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) -} - -func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - fc := &graphql.FieldContext{ - Object: "__Type", - Field: field, - Args: nil, - IsMethod: true, - IsResolver: false, - } - - ctx = graphql.WithFieldContext(ctx, fc) - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.OfType(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + res := obj.EnumValues(args["includeDeprecated"].(bool)) + return ec.marshalArray(ctx, field.Selections, res) } -// endregion **************************** field.gotpl ***************************** - -// region **************************** input.gotpl ***************************** - -// endregion **************************** input.gotpl ***************************** - -// region ************************** interface.gotpl *************************** - -// endregion ************************** interface.gotpl *************************** - -// region **************************** object.gotpl **************************** +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + res := obj.InputFields() + return ec.marshalArray(ctx, field.Selections, res) +} -var queryImplementors = []string{"Query"} +func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + res := obj.OfType() + return ec.marshalType(ctx, field.Selections, res) +} func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ - Object: "Query", - }) - out := graphql.NewFieldSet(fields) var invalids uint32 for i, field := range fields { @@ -1337,8 +353,6 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } -var __DirectiveImplementors = []string{"__Directive"} - func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) @@ -1376,8 +390,6 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS return out } -var __EnumValueImplementors = []string{"__EnumValue"} - func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) @@ -1412,8 +424,6 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS return out } -var __FieldImplementors = []string{"__Field"} - func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) @@ -1458,8 +468,6 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, return out } -var __InputValueImplementors = []string{"__InputValue"} - func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) @@ -1494,8 +502,6 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection return out } -var __SchemaImplementors = []string{"__Schema"} - func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) @@ -1535,8 +541,6 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, return out } -var __TypeImplementors = []string{"__Type"} - func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) @@ -1578,487 +582,46 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o return out } -// endregion **************************** object.gotpl **************************** - -// region ***************************** type.gotpl ***************************** - -func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { - res, err := graphql.UnmarshalBoolean(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { - res := graphql.MarshalBoolean(v) - if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") - } - } - return res -} - -func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) { - res, err := graphql.UnmarshalID(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - res := graphql.MarshalID(v) - if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") - } - } - return res -} - -func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { - res, err := graphql.UnmarshalString(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - res := graphql.MarshalString(v) - if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") - } - } - return res -} - -func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { - return ec.___Directive(ctx, sel, &v) -} - -func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() - return ret -} - -func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { - res, err := graphql.UnmarshalString(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - res := graphql.MarshalString(v) - if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") - } - } - return res -} - -func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { - var vSlice []interface{} - if v != nil { - if tmp1, ok := v.([]interface{}); ok { - vSlice = tmp1 - } else { - vSlice = []interface{}{v} - } - } - var err error - res := make([]string, len(vSlice)) - for i := range vSlice { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) - if err != nil { - return nil, err - } - } - return res, nil -} - -func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() - return ret -} - -func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { - return ec.___EnumValue(ctx, sel, &v) -} - -func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { - return ec.___Field(ctx, sel, &v) -} - -func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { - return ec.___InputValue(ctx, sel, &v) -} - -func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() - return ret -} - -func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { - return ec.___Type(ctx, sel, &v) -} - -func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() - return ret -} - -func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - return ec.___Type(ctx, sel, v) -} - -func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { - res, err := graphql.UnmarshalString(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - res := graphql.MarshalString(v) - if res == graphql.Null { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - ec.Errorf(ctx, "must not be null") - } - } - return res -} - -func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { - res, err := graphql.UnmarshalBoolean(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { - return graphql.MarshalBoolean(v) -} - -func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { - if v == nil { - return nil, nil - } - res, err := graphql.UnmarshalBoolean(v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return graphql.MarshalBoolean(*v) -} - -func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { - res, err := graphql.UnmarshalString(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - return graphql.MarshalString(v) -} - -func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { - if v == nil { - return nil, nil - } - res, err := graphql.UnmarshalString(v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return graphql.MarshalString(*v) -} - -func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { - if v == nil { - return graphql.Null - } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() - return ret -} - -func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { - if v == nil { - return graphql.Null - } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) +func (ec *executionContext) marshalArray(ctx context.Context, sel ast.SelectionSet, v interface{}) graphql.Marshaler { + if reflect.TypeOf(v).Kind() != reflect.Slice { + panic("expected slice type") } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() - } - ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } + slice := reflect.ValueOf(v) + len := slice.Len() + if len == 0 { + return graphql.Array{} } - wg.Wait() - return ret -} -func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { - if v == nil { - return graphql.Null - } - ret := make(graphql.Array, len(v)) + ret := make(graphql.Array, len) var wg sync.WaitGroup - isLen1 := len(v) == 1 + isLen1 := len == 1 if !isLen1 { - wg.Add(len(v)) + wg.Add(len) } - for i := range v { + for i := 0; i < len; i++ { i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) + v := slice.Index(i).Interface() f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) - } - - } - wg.Wait() - return ret -} - -func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec.___Schema(ctx, sel, v) -} - -func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { - if v == nil { - return graphql.Null - } - ret := make(graphql.Array, len(v)) - var wg sync.WaitGroup - isLen1 := len(v) == 1 - if !isLen1 { - wg.Add(len(v)) - } - for i := range v { - i := i - fc := &graphql.FieldContext{ - Index: &i, - Result: &v[i], - } - ctx := graphql.WithFieldContext(ctx, fc) - f := func(i int) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - if !isLen1 { - defer wg.Done() + switch typ := v.(type) { + case introspection.Type: + ret[i] = ec.___Type(ctx, sel, &typ) + case introspection.Directive: + ret[i] = ec.___Directive(ctx, sel, &typ) + case introspection.InputValue: + ret[i] = ec.___InputValue(ctx, sel, &typ) + case introspection.Field: + ret[i] = ec.___Field(ctx, sel, &typ) + case introspection.EnumValue: + ret[i] = ec.___EnumValue(ctx, sel, &typ) + case string: + ret[i] = graphql.MarshalString(typ) + default: + panic(fmt.Sprintf("unknown type %T", typ)) } - ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) } if isLen1 { f(i) @@ -2071,11 +634,9 @@ func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen return ret } -func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { +func (ec *executionContext) marshalType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { if v == nil { return graphql.Null } return ec.___Type(ctx, sel, v) } - -// endregion ***************************** type.gotpl ***************************** diff --git a/internal/gqlgen/gqlgen_deprecated.go b/internal/gqlgen/gqlgen_deprecated.go new file mode 100644 index 0000000000000..87bf33e16db48 --- /dev/null +++ b/internal/gqlgen/gqlgen_deprecated.go @@ -0,0 +1,2081 @@ +// Almost Code generated by github.com/99designs/gqlgen +package gqlgen + +import ( + "bytes" + "context" + "errors" + "io/ioutil" + "strconv" + "sync" + + "github.com/99designs/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql/introspection" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" +) + +// region ************************** generated!.gotpl ************************** + +// __deprecated_NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. +func __deprecated_NewExecutableSchema(filenames ...string) (graphql.ExecutableSchema, error) { + sources := make([]*ast.Source, len(filenames)) + for i, filename := range filenames { + body, err := ioutil.ReadFile(filename) + if err != nil { + return nil, err + } + sources[i] = &ast.Source{ + Name: filename, + Input: string(body), + } + } + AST, err := gqlparser.LoadSchema(sources...) + if err != nil { + return nil, err + } + return &__deprecated_executableSchema{ + parsedSchema: AST, + }, nil +} + +type __deprecated_executableSchema struct { + parsedSchema *ast.Schema +} + +func (e *__deprecated_executableSchema) Schema() *ast.Schema { + return e.parsedSchema +} + +func (e *__deprecated_executableSchema) Complexity(typeName, fieldName string, childComplexity int, args map[string]interface{}) (int, bool) { + return 0, false +} + +func (e *__deprecated_executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { + rc := graphql.GetOperationContext(ctx) + ec := __deprecated_executionContext{rc, e} + return func(ctx context.Context) *graphql.Response { + data := ec._Query(ctx, rc.Operation.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } +} + +type __deprecated_executionContext struct { + *graphql.OperationContext + *__deprecated_executableSchema +} + +func (ec *__deprecated_executionContext) introspectSchema() (*introspection.Schema, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapSchema(ec.parsedSchema), nil +} + +func (ec *__deprecated_executionContext) introspectType(name string) (*introspection.Type, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapTypeFromDef(ec.parsedSchema, ec.parsedSchema.Types[name]), nil +} + +// endregion ************************** generated!.gotpl ************************** + +// region ***************************** args.gotpl ***************************** + +func (ec *__deprecated_executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg0 + return args, nil +} + +func (ec *__deprecated_executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeDeprecated"] = arg0 + return args, nil +} + +func (ec *__deprecated_executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeDeprecated"] = arg0 + return args, nil +} + +// endregion ***************************** args.gotpl ***************************** + +// region ************************** directives.gotpl ************************** + +// endregion ************************** directives.gotpl ************************** + +// region **************************** field.gotpl ***************************** + +func (ec *__deprecated_executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Query___type_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectType(args["name"].(string)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectSchema() + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Schema) + fc.Result = res + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Locations, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DefaultValue, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Types(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.QueryType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MutationType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SubscriptionType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Directives(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Directive) + fc.Result = res + return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalN__TypeKind2string(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field___Type_fields_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fields(args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Field) + fc.Result = res + return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Interfaces(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PossibleTypes(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field___Type_enumValues_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnumValues(args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.EnumValue) + fc.Result = res + return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.InputFields(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *__deprecated_executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.OfType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +// endregion **************************** field.gotpl ***************************** + +// region **************************** input.gotpl ***************************** + +// endregion **************************** input.gotpl ***************************** + +// region ************************** interface.gotpl *************************** + +// endregion ************************** interface.gotpl *************************** + +// region **************************** object.gotpl **************************** + +var queryImplementors = []string{"Query"} + +func (ec *__deprecated_executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) + + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Query", + }) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Query") + case "__type": + out.Values[i] = ec._Query___type(ctx, field) + case "__schema": + out.Values[i] = ec._Query___schema(ctx, field) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __DirectiveImplementors = []string{"__Directive"} + +func (ec *__deprecated_executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Directive") + case "name": + out.Values[i] = ec.___Directive_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___Directive_description(ctx, field, obj) + case "locations": + out.Values[i] = ec.___Directive_locations(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "args": + out.Values[i] = ec.___Directive_args(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __EnumValueImplementors = []string{"__EnumValue"} + +func (ec *__deprecated_executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__EnumValue") + case "name": + out.Values[i] = ec.___EnumValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___EnumValue_description(ctx, field, obj) + case "isDeprecated": + out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "deprecationReason": + out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __FieldImplementors = []string{"__Field"} + +func (ec *__deprecated_executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Field") + case "name": + out.Values[i] = ec.___Field_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___Field_description(ctx, field, obj) + case "args": + out.Values[i] = ec.___Field_args(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "type": + out.Values[i] = ec.___Field_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "isDeprecated": + out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "deprecationReason": + out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __InputValueImplementors = []string{"__InputValue"} + +func (ec *__deprecated_executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__InputValue") + case "name": + out.Values[i] = ec.___InputValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___InputValue_description(ctx, field, obj) + case "type": + out.Values[i] = ec.___InputValue_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "defaultValue": + out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __SchemaImplementors = []string{"__Schema"} + +func (ec *__deprecated_executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Schema") + case "types": + out.Values[i] = ec.___Schema_types(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "queryType": + out.Values[i] = ec.___Schema_queryType(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "mutationType": + out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) + case "subscriptionType": + out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) + case "directives": + out.Values[i] = ec.___Schema_directives(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __TypeImplementors = []string{"__Type"} + +func (ec *__deprecated_executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Type") + case "kind": + out.Values[i] = ec.___Type_kind(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "name": + out.Values[i] = ec.___Type_name(ctx, field, obj) + case "description": + out.Values[i] = ec.___Type_description(ctx, field, obj) + case "fields": + out.Values[i] = ec.___Type_fields(ctx, field, obj) + case "interfaces": + out.Values[i] = ec.___Type_interfaces(ctx, field, obj) + case "possibleTypes": + out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) + case "enumValues": + out.Values[i] = ec.___Type_enumValues(ctx, field, obj) + case "inputFields": + out.Values[i] = ec.___Type_inputFields(ctx, field, obj) + case "ofType": + out.Values[i] = ec.___Type_ofType(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +// endregion **************************** object.gotpl **************************** + +// region ***************************** type.gotpl ***************************** + +func (ec *__deprecated_executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *__deprecated_executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + res := graphql.MarshalBoolean(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *__deprecated_executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalID(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *__deprecated_executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalID(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *__deprecated_executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *__deprecated_executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *__deprecated_executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { + return ec.___Directive(ctx, sel, &v) +} + +func (ec *__deprecated_executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *__deprecated_executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *__deprecated_executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *__deprecated_executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *__deprecated_executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *__deprecated_executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { + return ec.___EnumValue(ctx, sel, &v) +} + +func (ec *__deprecated_executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { + return ec.___Field(ctx, sel, &v) +} + +func (ec *__deprecated_executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { + return ec.___InputValue(ctx, sel, &v) +} + +func (ec *__deprecated_executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *__deprecated_executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { + return ec.___Type(ctx, sel, &v) +} + +func (ec *__deprecated_executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *__deprecated_executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec.___Type(ctx, sel, v) +} + +func (ec *__deprecated_executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *__deprecated_executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *__deprecated_executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *__deprecated_executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + return graphql.MarshalBoolean(v) +} + +func (ec *__deprecated_executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalBoolean(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *__deprecated_executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return graphql.MarshalBoolean(*v) +} + +func (ec *__deprecated_executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *__deprecated_executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + return graphql.MarshalString(v) +} + +func (ec *__deprecated_executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalString(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *__deprecated_executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return graphql.MarshalString(*v) +} + +func (ec *__deprecated_executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *__deprecated_executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *__deprecated_executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *__deprecated_executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Schema(ctx, sel, v) +} + +func (ec *__deprecated_executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *__deprecated_executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Type(ctx, sel, v) +} + +// endregion ***************************** type.gotpl ***************************** diff --git a/internal/gqlgen/gqlgen_test.go b/internal/gqlgen/gqlgen_test.go new file mode 100644 index 0000000000000..4be1698dd3e00 --- /dev/null +++ b/internal/gqlgen/gqlgen_test.go @@ -0,0 +1,97 @@ +package gqlgen_test + +import ( + "context" + "encoding/json" + "path/filepath" + "testing" + + "github.com/99designs/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql/executor" + "github.com/Code-Hex/gqldoc/internal/gqlgen" + "github.com/Code-Hex/gqldoc/internal/introspection" + "github.com/Code-Hex/gqldoc/loader" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/pkg/errors" +) + +func TestGitHubSchema(t *testing.T) { + schema := filepath.Join("..", "..", "example", "github", "schema.graphql") + root, err := loader.LoadSchema(schema) + if err != nil { + t.Fatal(err) + } + + root2, err := LoadSchema(schema) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(root2, root, cmpopts.IgnoreUnexported(introspection.Schema{})); diff != "" { + t.Fatalf("-want, +got\n%s", diff) + } +} + +func TestStarwarsSchema(t *testing.T) { + schema := filepath.Join("..", "..", "example", "starwars", "schema.graphql") + root, err := loader.LoadSchema(schema) + if err != nil { + t.Fatal(err) + } + + root2, err := LoadSchema(schema) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(root2, root, cmpopts.IgnoreUnexported(introspection.Schema{})); diff != "" { + t.Fatalf("-want, +got\n%s", diff) + } +} + +func TestShopifySchema(t *testing.T) { + schema := filepath.Join("..", "..", "example", "shopify", "schema.graphql") + root, err := loader.LoadSchema(schema) + if err != nil { + t.Fatal(err) + } + + root2, err := LoadSchema(schema) + if err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(root2, root, cmpopts.IgnoreUnexported(introspection.Schema{})); diff != "" { + t.Fatalf("-want, +got\n%s", diff) + } +} + +func LoadSchema(filenames ...string) (*introspection.Root, error) { + es, err := gqlgen.Deprecated_NewExecutableSchema(filenames...) + if err != nil { + return nil, errors.WithStack(err) + } + + // Set time for tracing + ctx := graphql.StartOperationTrace(context.Background()) + + exec := executor.New(es) + oc, err := exec.CreateOperationContext(ctx, &graphql.RawParams{ + Query: introspection.Query, + }) + // Need to do introspection + oc.DisableIntrospection = false + + responses, ctx := exec.DispatchOperation(ctx, oc) + resp := responses(ctx) + if len(resp.Errors) > 0 { + return nil, resp.Errors + } + + var res introspection.Root + if err := json.Unmarshal(resp.Data, &res); err != nil { + return nil, err + } + return &res, nil +} diff --git a/internal/gqlgen/utils_for_test.go b/internal/gqlgen/utils_for_test.go new file mode 100644 index 0000000000000..29b42baba2fee --- /dev/null +++ b/internal/gqlgen/utils_for_test.go @@ -0,0 +1,3 @@ +package gqlgen + +var Deprecated_NewExecutableSchema = __deprecated_NewExecutableSchema