MCPcopy Create free account
hub / github.com/github/docs / Mutation

Function Mutation

components/graphql/Mutation.tsx:15–45  ·  view source on GitHub ↗
({ item }: Props)

Source from the content-addressed store, hash-verified

13}
14
15export function Mutation({ item }: Props) {
16 const { locale } = useRouter()
17 const { t } = useTranslation('products')
18 const heading = t('graphql.reference.input_fields')
19 const heading2 = t('graphql.reference.return_fields')
20
21 return (
22 <GraphqlItem item={item} heading={heading}>
23 {item.inputFields.map((input) => (
24 <React.Fragment key={input.id}>
25 <ul>
26 <li>
27 <code>{input.name}</code> (
28 <code>
29 <Link href={input.href} locale={locale}>
30 {input.type}
31 </Link>
32 </code>
33 )
34 </li>
35 </ul>
36
37 {input.preview && <Notice item={input} variant="preview" />}
38 {input.isDeprecated && <Notice item={input} variant="deprecation" />}
39 <h4>{heading2}</h4>
40 <Table fields={item.returnFields} />
41 </React.Fragment>
42 ))}
43 </GraphqlItem>
44 )
45}

Callers

nothing calls this directly

Calls 1

useTranslationFunction · 0.90

Tested by

no test coverage detected