Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bb7587fc
Commit
bb7587fc
authored
Jun 18, 2020
by
Evan Read
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor edit of new content
parent
c600d273
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
doc/development/api_graphql_styleguide.md
doc/development/api_graphql_styleguide.md
+12
-13
No files found.
doc/development/api_graphql_styleguide.md
View file @
bb7587fc
...
...
@@ -717,8 +717,7 @@ will be returned as the result of the mutation.
### Naming conventions
Each mutation must define a
`graphql_name`
, which is the name of the
mutation in the GraphQL schema.
Each mutation must define a
`graphql_name`
, which is the name of the mutation in the GraphQL schema.
Example:
...
...
@@ -728,9 +727,8 @@ class UserUpdateMutation < BaseMutation
end
```
Our GraphQL mutation names are historically inconsistent, but new
mutation names should follow the convention
`'{Resource}{Action}'`
or
`'{Resource}{Action}{Attribute}'`
.
Our GraphQL mutation names are historically inconsistent, but new mutation names should follow the
convention
`'{Resource}{Action}'`
or
`'{Resource}{Action}{Attribute}'`
.
Mutations that
**create**
new resources should use the verb
`Create`
.
...
...
@@ -738,9 +736,10 @@ Example:
-
`CommitCreate`
Mutations that
**update**
data should use the verb
`Update`
or a
domain-specific verb like
`Set`
,
`Add`
, or
`Toggle`
if more
appropriate.
Mutations that
**update**
data should use:
-
The verb
`Update`
.
-
A domain-specific verb like
`Set`
,
`Add`
, or
`Toggle`
if more appropriate.
Examples:
...
...
@@ -749,17 +748,17 @@ Examples:
-
`IssueUpdate`
-
`TodoMarkDone`
Mutations that
**remove**
data should use the verb
`Delete`
rather than
`Destroy`
. Or use a domain-specific verb like
`Remove`
if more
appropriate.
Mutations that
**remove**
data should use:
-
The verb
`Delete`
rather than
`Destroy`
.
-
A domain-specific verb like
`Remove`
if more appropriate.
Examples:
-
`AwardEmojiRemove`
-
`NoteDelete`
If you need advice for mutation naming, canvass the Slack
`#graphql`
channel for feedback.
If you need advice for mutation naming, canvass the Slack
`#graphql`
channel for feedback.
### Arguments
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment