-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge release/1.0.0-rc.2 into master
- Loading branch information
Showing
182 changed files
with
2,291 additions
and
2,441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "Magento 2 GraphQL Schema", | ||
"schemaPath": "packages/api-client/schema.graphql", | ||
"extensions": { | ||
"endpoints": { | ||
"Default GraphQL Endpoint": { | ||
"url": "https://{YOUR_SITE_FRONT_URL}/graphql", | ||
"headers": { | ||
"user-agent": "JS GraphQL" | ||
}, | ||
"introspect": false | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/api-client/src/api/addConfigurableProductsToCart/addConfigurableProductsToCart.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import gql from 'graphql-tag'; | ||
import CompleteCartData from '../../fragments/completeCartFragment'; | ||
|
||
export default gql` | ||
${CompleteCartData} | ||
mutation addConfigurableProductsToCart($input: AddConfigurableProductsToCartInput) { | ||
addConfigurableProductsToCart(input: $input) { | ||
cart { | ||
...CompleteCartData | ||
} | ||
} | ||
}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
packages/api-client/src/api/addConfigurableProductsToCart/mutation.graphql
This file was deleted.
Oops, something went wrong.
9 changes: 6 additions & 3 deletions
9
...api/addProductToWishList/mutation.graphql → ...roductToWishList/addProductsToWishlist.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
#import "../../fragments/wishlistDataFragment.graphql" | ||
import gql from 'graphql-tag'; | ||
import WishlistData from '../../fragments/wishlistDataFragment'; | ||
|
||
export default gql` | ||
${WishlistData} | ||
mutation addProductsToWishlist($id: ID!, $items: [WishlistItemInput!]!) { | ||
addProductsToWishlist(wishlistId: $id, wishlistItems: $items) { | ||
wishlist { | ||
...Wishlistdata | ||
...WishlistData | ||
} | ||
} | ||
} | ||
}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...rc/api/addProductsToCart/mutation.graphql → ...pi/addProductsToCart/addProductsToCart.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
#import "../../fragments/completeCartFragment.graphql" | ||
import gql from 'graphql-tag'; | ||
import CompleteCartData from '../../fragments/completeCartFragment'; | ||
|
||
export default gql` | ||
${CompleteCartData} | ||
mutation addProductsToCart($cartId: String!, $cartItems: [CartItemInput!]!) { | ||
addProductsToCart(cartId,: $cartId, cartItems,: $cartItems) { | ||
cart { | ||
...CompleteCartData | ||
} | ||
} | ||
} | ||
}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
import { FetchResult } from '@apollo/client'; | ||
import mutation from './mutation.graphql'; | ||
import addProductsToCart from './addProductsToCart'; | ||
import { | ||
AddProductsToCartInput, | ||
AddProductsToCartMutation, | ||
AddProductsToCartMutation, CartItemInput, | ||
} from '../../types/GraphQL'; | ||
import { Context } from '../../types/context'; | ||
|
||
export type AddProductsToCartInput = { | ||
cartId: string; | ||
cartItems: CartItemInput[]; | ||
}; | ||
|
||
export default async ( | ||
{ client }: Context, | ||
input: AddProductsToCartInput, | ||
): Promise<FetchResult<AddProductsToCartMutation>> => client | ||
.mutate<AddProductsToCartMutation, AddProductsToCartInput>({ | ||
mutation, | ||
mutation: addProductsToCart, | ||
variables: input, | ||
}); |
7 changes: 5 additions & 2 deletions
7
.../addSimpleProductsToCart/mutation.graphql → ...ProductsToCart/addSimpleProductsToCart.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
#import "../../fragments/completeCartFragment.graphql" | ||
import gql from 'graphql-tag'; | ||
import CompleteCartData from '../../fragments/completeCartFragment'; | ||
|
||
export default gql` | ||
${CompleteCartData} | ||
mutation addSimpleProductsToCart($input: AddSimpleProductsToCartInput) { | ||
addSimpleProductsToCart(input: $input) { | ||
cart { | ||
...CompleteCartData | ||
} | ||
} | ||
} | ||
}`; |
Oops, something went wrong.