|
|
@@ -7,31 +7,31 @@ exports[`addGraphQLCustomFields() extends OrderAddress if Address custom fields
|
|
|
customFields: AddressCustomFields
|
|
|
}
|
|
|
|
|
|
-type AddressCustomFields {
|
|
|
- instructions: String
|
|
|
+type OrderAddress {
|
|
|
+ streetLine1: String
|
|
|
+ customFields: AddressCustomFields
|
|
|
}
|
|
|
|
|
|
-scalar DateTime
|
|
|
-
|
|
|
scalar JSON
|
|
|
|
|
|
-type OrderAddress {
|
|
|
- streetLine1: String
|
|
|
- customFields: AddressCustomFields
|
|
|
+scalar DateTime
|
|
|
+
|
|
|
+type AddressCustomFields {
|
|
|
+ instructions: String
|
|
|
}
|
|
|
"
|
|
|
`;
|
|
|
|
|
|
exports[`addGraphQLCustomFields() extends a type 1`] = `
|
|
|
-"scalar DateTime
|
|
|
-
|
|
|
-scalar JSON
|
|
|
-
|
|
|
-type Product {
|
|
|
+"type Product {
|
|
|
id: ID
|
|
|
customFields: ProductCustomFields
|
|
|
}
|
|
|
|
|
|
+scalar JSON
|
|
|
+
|
|
|
+scalar DateTime
|
|
|
+
|
|
|
type ProductCustomFields {
|
|
|
available: Boolean
|
|
|
}
|
|
|
@@ -39,34 +39,11 @@ type ProductCustomFields {
|
|
|
`;
|
|
|
|
|
|
exports[`addGraphQLCustomFields() extends a type with FilterParameters 1`] = `
|
|
|
-"input BooleanOperators {
|
|
|
- eq: Boolean
|
|
|
-}
|
|
|
-
|
|
|
-input DateOperators {
|
|
|
- eq: String
|
|
|
-}
|
|
|
-
|
|
|
-scalar DateTime
|
|
|
-
|
|
|
-scalar JSON
|
|
|
-
|
|
|
-input NumberOperators {
|
|
|
- eq: Float
|
|
|
-}
|
|
|
-
|
|
|
-type Product {
|
|
|
+"type Product {
|
|
|
name: String
|
|
|
customFields: ProductCustomFields
|
|
|
}
|
|
|
|
|
|
-type ProductCustomFields {
|
|
|
- available: Boolean
|
|
|
- shortName: String
|
|
|
- rating: Float
|
|
|
- published: DateTime
|
|
|
-}
|
|
|
-
|
|
|
input ProductFilterParameter {
|
|
|
id: StringOperators
|
|
|
available: BooleanOperators
|
|
|
@@ -78,22 +55,36 @@ input ProductFilterParameter {
|
|
|
input StringOperators {
|
|
|
eq: String
|
|
|
}
|
|
|
-"
|
|
|
-`;
|
|
|
|
|
|
-exports[`addGraphQLCustomFields() extends a type with SortParameters 1`] = `
|
|
|
-"scalar DateTime
|
|
|
+input NumberOperators {
|
|
|
+ eq: Float
|
|
|
+}
|
|
|
|
|
|
-scalar JSON
|
|
|
+input DateOperators {
|
|
|
+ eq: String
|
|
|
+}
|
|
|
|
|
|
-type Product {
|
|
|
- id: ID
|
|
|
- customFields: ProductCustomFields
|
|
|
+input BooleanOperators {
|
|
|
+ eq: Boolean
|
|
|
}
|
|
|
|
|
|
+scalar JSON
|
|
|
+
|
|
|
+scalar DateTime
|
|
|
+
|
|
|
type ProductCustomFields {
|
|
|
available: Boolean
|
|
|
shortName: String
|
|
|
+ rating: Float
|
|
|
+ published: DateTime
|
|
|
+}
|
|
|
+"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`addGraphQLCustomFields() extends a type with SortParameters 1`] = `
|
|
|
+"type Product {
|
|
|
+ id: ID
|
|
|
+ customFields: ProductCustomFields
|
|
|
}
|
|
|
|
|
|
input ProductSortParameter {
|
|
|
@@ -106,12 +97,22 @@ enum SortOrder {
|
|
|
ASC
|
|
|
DESC
|
|
|
}
|
|
|
+
|
|
|
+scalar JSON
|
|
|
+
|
|
|
+scalar DateTime
|
|
|
+
|
|
|
+type ProductCustomFields {
|
|
|
+ available: Boolean
|
|
|
+ shortName: String
|
|
|
+}
|
|
|
"
|
|
|
`;
|
|
|
|
|
|
exports[`addGraphQLCustomFields() extends a type with a Create input 1`] = `
|
|
|
-"input CreateProductCustomFieldsInput {
|
|
|
- available: Boolean
|
|
|
+"type Product {
|
|
|
+ id: ID
|
|
|
+ customFields: ProductCustomFields
|
|
|
}
|
|
|
|
|
|
input CreateProductInput {
|
|
|
@@ -119,25 +120,35 @@ input CreateProductInput {
|
|
|
customFields: CreateProductCustomFieldsInput
|
|
|
}
|
|
|
|
|
|
-scalar DateTime
|
|
|
-
|
|
|
scalar JSON
|
|
|
|
|
|
-type Product {
|
|
|
- id: ID
|
|
|
- customFields: ProductCustomFields
|
|
|
-}
|
|
|
+scalar DateTime
|
|
|
|
|
|
type ProductCustomFields {
|
|
|
available: Boolean
|
|
|
shortName: String
|
|
|
}
|
|
|
+
|
|
|
+input CreateProductCustomFieldsInput {
|
|
|
+ available: Boolean
|
|
|
+}
|
|
|
"
|
|
|
`;
|
|
|
|
|
|
exports[`addGraphQLCustomFields() extends a type with a Create input and a translation 1`] = `
|
|
|
-"input CreateProductCustomFieldsInput {
|
|
|
- available: Boolean
|
|
|
+"type Product {
|
|
|
+ id: ID
|
|
|
+ customFields: ProductCustomFields
|
|
|
+}
|
|
|
+
|
|
|
+type ProductTranslation {
|
|
|
+ id: ID
|
|
|
+ customFields: ProductTranslationCustomFields
|
|
|
+}
|
|
|
+
|
|
|
+input ProductTranslationInput {
|
|
|
+ id: ID
|
|
|
+ customFields: ProductTranslationInputCustomFields
|
|
|
}
|
|
|
|
|
|
input CreateProductInput {
|
|
|
@@ -145,32 +156,21 @@ input CreateProductInput {
|
|
|
customFields: CreateProductCustomFieldsInput
|
|
|
}
|
|
|
|
|
|
-scalar DateTime
|
|
|
-
|
|
|
scalar JSON
|
|
|
|
|
|
-type Product {
|
|
|
- id: ID
|
|
|
- customFields: ProductCustomFields
|
|
|
-}
|
|
|
+scalar DateTime
|
|
|
|
|
|
type ProductCustomFields {
|
|
|
available: Boolean
|
|
|
shortName: String
|
|
|
}
|
|
|
|
|
|
-type ProductTranslation {
|
|
|
- id: ID
|
|
|
- customFields: ProductTranslationCustomFields
|
|
|
-}
|
|
|
-
|
|
|
type ProductTranslationCustomFields {
|
|
|
shortName: String
|
|
|
}
|
|
|
|
|
|
-input ProductTranslationInput {
|
|
|
- id: ID
|
|
|
- customFields: ProductTranslationInputCustomFields
|
|
|
+input CreateProductCustomFieldsInput {
|
|
|
+ available: Boolean
|
|
|
}
|
|
|
|
|
|
input ProductTranslationInputCustomFields {
|
|
|
@@ -180,26 +180,26 @@ input ProductTranslationInputCustomFields {
|
|
|
`;
|
|
|
|
|
|
exports[`addGraphQLCustomFields() extends a type with a translation 1`] = `
|
|
|
-"scalar DateTime
|
|
|
-
|
|
|
-scalar JSON
|
|
|
-
|
|
|
-type Product {
|
|
|
+"type Product {
|
|
|
id: ID
|
|
|
translations: [ProductTranslation!]!
|
|
|
customFields: ProductCustomFields
|
|
|
}
|
|
|
|
|
|
-type ProductCustomFields {
|
|
|
- available: Boolean
|
|
|
- shortName: String
|
|
|
-}
|
|
|
-
|
|
|
type ProductTranslation {
|
|
|
id: ID
|
|
|
customFields: ProductTranslationCustomFields
|
|
|
}
|
|
|
|
|
|
+scalar JSON
|
|
|
+
|
|
|
+scalar DateTime
|
|
|
+
|
|
|
+type ProductCustomFields {
|
|
|
+ available: Boolean
|
|
|
+ shortName: String
|
|
|
+}
|
|
|
+
|
|
|
type ProductTranslationCustomFields {
|
|
|
shortName: String
|
|
|
}
|
|
|
@@ -207,15 +207,20 @@ type ProductTranslationCustomFields {
|
|
|
`;
|
|
|
|
|
|
exports[`addGraphQLCustomFields() extends a type with an Update input 1`] = `
|
|
|
-"scalar DateTime
|
|
|
-
|
|
|
-scalar JSON
|
|
|
-
|
|
|
-type Product {
|
|
|
+"type Product {
|
|
|
id: ID
|
|
|
customFields: ProductCustomFields
|
|
|
}
|
|
|
|
|
|
+input UpdateProductInput {
|
|
|
+ image: String
|
|
|
+ customFields: UpdateProductCustomFieldsInput
|
|
|
+}
|
|
|
+
|
|
|
+scalar JSON
|
|
|
+
|
|
|
+scalar DateTime
|
|
|
+
|
|
|
type ProductCustomFields {
|
|
|
available: Boolean
|
|
|
shortName: String
|
|
|
@@ -224,24 +229,19 @@ type ProductCustomFields {
|
|
|
input UpdateProductCustomFieldsInput {
|
|
|
available: Boolean
|
|
|
}
|
|
|
-
|
|
|
-input UpdateProductInput {
|
|
|
- image: String
|
|
|
- customFields: UpdateProductCustomFieldsInput
|
|
|
-}
|
|
|
"
|
|
|
`;
|
|
|
|
|
|
exports[`addGraphQLCustomFields() publicOnly = true 1`] = `
|
|
|
-"scalar DateTime
|
|
|
-
|
|
|
-scalar JSON
|
|
|
-
|
|
|
-type Product {
|
|
|
+"type Product {
|
|
|
id: ID
|
|
|
customFields: ProductCustomFields
|
|
|
}
|
|
|
|
|
|
+scalar JSON
|
|
|
+
|
|
|
+scalar DateTime
|
|
|
+
|
|
|
type ProductCustomFields {
|
|
|
available: Boolean
|
|
|
}
|
|
|
@@ -249,14 +249,14 @@ type ProductCustomFields {
|
|
|
`;
|
|
|
|
|
|
exports[`addGraphQLCustomFields() uses JSON scalar if no custom fields defined 1`] = `
|
|
|
-"scalar DateTime
|
|
|
-
|
|
|
-scalar JSON
|
|
|
-
|
|
|
-type Product {
|
|
|
+"type Product {
|
|
|
id: ID
|
|
|
customFields: JSON
|
|
|
}
|
|
|
+
|
|
|
+scalar JSON
|
|
|
+
|
|
|
+scalar DateTime
|
|
|
"
|
|
|
`;
|
|
|
|
|
|
@@ -281,16 +281,7 @@ input OrderLineCustomFieldsInput {
|
|
|
`;
|
|
|
|
|
|
exports[`addRegisterCustomerCustomFieldsInput() add public writable custom fields to RegisterCustomerInput 1`] = `
|
|
|
-"type Mutation {
|
|
|
- registerCustomerAccount(input: RegisterCustomerInput!): Boolean!
|
|
|
-}
|
|
|
-
|
|
|
-input RegisterCustomerCustomFieldsInput {
|
|
|
- isB2B: Boolean
|
|
|
- message: String
|
|
|
-}
|
|
|
-
|
|
|
-input RegisterCustomerInput {
|
|
|
+"input RegisterCustomerInput {
|
|
|
emailAddress: String!
|
|
|
title: String
|
|
|
firstName: String
|
|
|
@@ -299,5 +290,14 @@ input RegisterCustomerInput {
|
|
|
password: String
|
|
|
customFields: RegisterCustomerCustomFieldsInput
|
|
|
}
|
|
|
+
|
|
|
+type Mutation {
|
|
|
+ registerCustomerAccount(input: RegisterCustomerInput!): Boolean!
|
|
|
+}
|
|
|
+
|
|
|
+input RegisterCustomerCustomFieldsInput {
|
|
|
+ isB2B: Boolean
|
|
|
+ message: String
|
|
|
+}
|
|
|
"
|
|
|
`;
|