Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Adding the missing menu item for the DynamicRows topic #4808

Merged
merged 3 commits into from
Jun 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _data/toc/extension-best-practices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ pages:

- label: Creating a Magento admin page
url: /ext-best-practices/extension-coding/example-module-adminpage.html

- label: Creating a dynamic row system config
url: /ext-best-practices/tutorials/dynamic-row-system-config.html
26 changes: 26 additions & 0 deletions guides/v2.3/graphql/develop/resolvers.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,32 @@ Syntax option | Description
`@doc(description)` | Describes the purpose of the mutation
`@deprecated(reason: "description")` | Use `@deprecated` to mark a query, mutation, or attribute as deprecated

{:.bs-callout .bs-callout-tip}
It is a good practice to define separate types for input and output data. This practice permits additional extension points, so every input and output type can be extended by adding additional fields to the definition.

#### Example

**Wrong approach**

```text
type Mutation {
mutationQueryName(param1: String, param2: Int, ...): MutationQueryOutput @resolver(class: "Magento\\<module_name>\\Model\\Resolver\\MutationResolverModel") @doc(description:"Mutation query description")
}
```

**Correct approach**

```text
type Mutation {
mutationQueryName(inputParam: InputParamsType): MutationQueryOutput @resolver(class: "Magento\\<module_name>\\Model\\Resolver\\MutationResolverModel") @doc(description:"Mutation query description")
}

type InputParamsType {
param1: String
param2: Int
}
```

### Resolver class
Use the following sample code as a template for the GraphQl resolver query/mutation class

Expand Down