This repository was archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
GraphQL coverage for shopper assistance #8303
Merged
keharper
merged 7 commits into
magento:2.4.2-develop
from
sathiyaaa:issue-8281-graphql-coverage-for-shopper-assistance
Dec 6, 2020
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
52f24a0
added graphql coverage for shopper assistance
sathiyaaa 492a799
fixed lint errors
sathiyaaa da66af4
Apply suggestions from code review
sathiyaaa 0902218
Update graphql.yml
keharper 18655a5
Update generate-customer-token-as-admin.md
keharper ac9fb5f
Update generate-customer-token-as-admin.md
keharper 587126e
Merge branch '2.4.2-develop' into issue-8281-graphql-coverage-for-sho…
keharper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
64 changes: 64 additions & 0 deletions
64
src/guides/v2.4/graphql/mutations/generate-customer-token-as-admin.md
This file contains hidden or 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,64 @@ | ||
| --- | ||
| group: graphql | ||
| title: generateCustomerTokenAsAdmin mutation | ||
| b2b_only: true | ||
| contributor_name: EY | ||
| --- | ||
|
|
||
| Use the `generateCustomerTokenAsAdmin` mutation to generate a new customer token as an admin so that an administrator can perform remote shopping assistance. | ||
| The customer must have enabled the `allow_remote_shopping_assistance` feature while creating the customer profile. | ||
|
|
||
| ## Syntax | ||
|
|
||
| ```graphql | ||
| mutation {generateCustomerTokenAsAdmin(input: GenerateCustomerTokenAsAdminInput!) {GenerateCustomerTokenAsAdminOutput}} | ||
| ``` | ||
|
|
||
| ## Example usage | ||
|
|
||
| The following call creates a new customer token. | ||
|
|
||
| **Request:** | ||
|
|
||
| ```graphql | ||
| mutation{ | ||
| generateCustomerTokenAsAdmin(input: { | ||
| customer_email: "customer1@mail.com" | ||
| }){ | ||
| customer_token | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| **Response:** | ||
|
|
||
| ```json | ||
| { | ||
| "data": { | ||
| "generateCustomerTokenAsAdmin": { | ||
| "customer_token": "cr0717abzoagxty1xjn4lj13kim36r6x" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Input attributes | ||
|
|
||
| The `generateCustomerTokenAsAdmin` mutation requires the following input attribute: | ||
|
|
||
| Attribute | Data Type | Description | ||
| --- | --- | --- | ||
| `customer_email` | String | The customer's email address | ||
|
|
||
| ## Output attributes | ||
|
|
||
| The `generateCustomerTokenAsAdmin` mutation returns a valid customer token as the output. | ||
|
|
||
| Attribute | Data Type | Description | ||
| --- | --- | --- | ||
| `customer_token` | String | The customer token | ||
sathiyaaa marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Related topics | ||
|
|
||
| * [customer query]({{page.baseurl}}/graphql/queries/customer.html) | ||
| * [revokeCustomerToken mutation]({{page.baseurl}}/graphql/mutations/revoke-customer-token.html) | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.