polen 0.10.0-next.15 → 0.10.0-next.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +9 -8
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/lib/graphql-change/change-groups.d.ts +52 -0
- package/build/lib/graphql-change/change-groups.d.ts.map +1 -0
- package/build/lib/graphql-change/change-groups.js +33 -0
- package/build/lib/graphql-change/change-groups.js.map +1 -0
- package/build/lib/graphql-change/change-types.d.ts +170 -0
- package/build/lib/graphql-change/change-types.d.ts.map +1 -0
- package/build/lib/graphql-change/change-types.js +11 -0
- package/build/lib/graphql-change/change-types.js.map +1 -0
- package/build/lib/graphql-change/criticality.d.ts +26 -0
- package/build/lib/graphql-change/criticality.d.ts.map +1 -0
- package/build/lib/graphql-change/criticality.js +30 -0
- package/build/lib/graphql-change/criticality.js.map +1 -0
- package/build/lib/graphql-change/graphql-change.d.ts +5 -6
- package/build/lib/graphql-change/graphql-change.d.ts.map +1 -1
- package/build/lib/graphql-change/graphql-change.js +4 -0
- package/build/lib/graphql-change/graphql-change.js.map +1 -1
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts +0 -2
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +1 -1
- package/build/lib/graphql-document/components/GraphQLDocument.js +5 -5
- package/build/lib/graphql-document/components/GraphQLDocument.js.map +1 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts +1 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts.map +1 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js +1 -3
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js.map +1 -1
- package/build/lib/graphql-document/positioning-simple.d.ts +1 -1
- package/build/lib/graphql-document/positioning-simple.js +1 -1
- package/build/template/components/Changelog/ChangeBase.d.ts +9 -0
- package/build/template/components/Changelog/ChangeBase.d.ts.map +1 -0
- package/build/template/components/Changelog/ChangeBase.js +5 -0
- package/build/template/components/Changelog/ChangeBase.js.map +1 -0
- package/build/template/components/Changelog/CriticalitySection.d.ts +11 -0
- package/build/template/components/Changelog/CriticalitySection.d.ts.map +1 -0
- package/build/template/components/Changelog/CriticalitySection.js +11 -0
- package/build/template/components/Changelog/CriticalitySection.js.map +1 -0
- package/build/template/components/Changelog/changes/index.d.ts +2 -0
- package/build/template/components/Changelog/changes/index.d.ts.map +1 -0
- package/build/template/components/Changelog/changes/index.js +2 -0
- package/build/template/components/Changelog/changes/index.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgument.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveArgument.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgument.js +12 -0
- package/build/template/components/Changelog/groups/DirectiveArgument.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentDescription.js +7 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentOperation.js +12 -0
- package/build/template/components/Changelog/groups/DirectiveArgumentOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveDescription.js +7 -0
- package/build/template/components/Changelog/groups/DirectiveDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveLocationOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveLocationOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveLocationOperation.js +12 -0
- package/build/template/components/Changelog/groups/DirectiveLocationOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveOperation.js +12 -0
- package/build/template/components/Changelog/groups/DirectiveOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveUsage.d.ts +6 -0
- package/build/template/components/Changelog/groups/DirectiveUsage.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/DirectiveUsage.js +59 -0
- package/build/template/components/Changelog/groups/DirectiveUsage.js.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueDeprecationReason.d.ts +6 -0
- package/build/template/components/Changelog/groups/EnumValueDeprecationReason.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueDeprecationReason.js +14 -0
- package/build/template/components/Changelog/groups/EnumValueDeprecationReason.js.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/EnumValueDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueDescription.js +7 -0
- package/build/template/components/Changelog/groups/EnumValueDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/EnumValueOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/EnumValueOperation.js +12 -0
- package/build/template/components/Changelog/groups/EnumValueOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgument.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldArgument.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgument.js +12 -0
- package/build/template/components/Changelog/groups/FieldArgument.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgumentDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldArgumentDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgumentDescription.js +7 -0
- package/build/template/components/Changelog/groups/FieldArgumentDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgumentOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldArgumentOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldArgumentOperation.js +12 -0
- package/build/template/components/Changelog/groups/FieldArgumentOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldDeprecation.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldDeprecation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldDeprecation.js +12 -0
- package/build/template/components/Changelog/groups/FieldDeprecation.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldDeprecationReason.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldDeprecationReason.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldDeprecationReason.js +14 -0
- package/build/template/components/Changelog/groups/FieldDeprecationReason.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldDescription.js +14 -0
- package/build/template/components/Changelog/groups/FieldDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/FieldOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/FieldOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/FieldOperation.js +14 -0
- package/build/template/components/Changelog/groups/FieldOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldDefaultValue.d.ts +6 -0
- package/build/template/components/Changelog/groups/InputFieldDefaultValue.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldDefaultValue.js +7 -0
- package/build/template/components/Changelog/groups/InputFieldDefaultValue.js.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/InputFieldDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldDescription.js +14 -0
- package/build/template/components/Changelog/groups/InputFieldDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/InputFieldOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/InputFieldOperation.js +14 -0
- package/build/template/components/Changelog/groups/InputFieldOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/ObjectTypeInterfaceOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/ObjectTypeInterfaceOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/ObjectTypeInterfaceOperation.js +12 -0
- package/build/template/components/Changelog/groups/ObjectTypeInterfaceOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/SchemaRootType.d.ts +6 -0
- package/build/template/components/Changelog/groups/SchemaRootType.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/SchemaRootType.js +14 -0
- package/build/template/components/Changelog/groups/SchemaRootType.js.map +1 -0
- package/build/template/components/Changelog/groups/TypeDescription.d.ts +6 -0
- package/build/template/components/Changelog/groups/TypeDescription.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/TypeDescription.js +14 -0
- package/build/template/components/Changelog/groups/TypeDescription.js.map +1 -0
- package/build/template/components/Changelog/groups/TypeOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/TypeOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/TypeOperation.js +14 -0
- package/build/template/components/Changelog/groups/TypeOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/UnionMemberOperation.d.ts +6 -0
- package/build/template/components/Changelog/groups/UnionMemberOperation.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/UnionMemberOperation.js +12 -0
- package/build/template/components/Changelog/groups/UnionMemberOperation.js.map +1 -0
- package/build/template/components/Changelog/groups/index.d.ts +26 -0
- package/build/template/components/Changelog/groups/index.d.ts.map +1 -0
- package/build/template/components/Changelog/groups/index.js +26 -0
- package/build/template/components/Changelog/groups/index.js.map +1 -0
- package/build/template/components/Changelog.d.ts.map +1 -1
- package/build/template/components/Changelog.js +108 -27
- package/build/template/components/Changelog.js.map +1 -1
- package/build/template/components/ChangelogLayout.d.ts +9 -0
- package/build/template/components/ChangelogLayout.d.ts.map +1 -0
- package/build/template/components/ChangelogLayout.js +71 -0
- package/build/template/components/ChangelogLayout.js.map +1 -0
- package/build/template/components/layouts/SidebarLayout.d.ts +9 -0
- package/build/template/components/layouts/SidebarLayout.d.ts.map +1 -0
- package/build/template/components/layouts/SidebarLayout.js +25 -0
- package/build/template/components/layouts/SidebarLayout.js.map +1 -0
- package/build/template/components/layouts/index.d.ts +2 -0
- package/build/template/components/layouts/index.d.ts.map +1 -0
- package/build/template/components/layouts/index.js +2 -0
- package/build/template/components/layouts/index.js.map +1 -0
- package/build/template/entry.client.d.ts +0 -1
- package/build/template/entry.client.d.ts.map +1 -1
- package/build/template/entry.client.js +0 -1
- package/build/template/entry.client.js.map +1 -1
- package/build/template/routes/changelog.d.ts.map +1 -1
- package/build/template/routes/changelog.js +2 -1
- package/build/template/routes/changelog.js.map +1 -1
- package/build/template/routes/reference.d.ts +2 -1
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/reference.js +20 -1
- package/build/template/routes/reference.js.map +1 -1
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.js +7 -68
- package/build/template/routes/root.js.map +1 -1
- package/package.json +3 -3
- package/src/api/vite/plugins/core.ts +9 -8
- package/src/lib/graphql-change/change-groups.ts +250 -0
- package/src/lib/graphql-change/change-types.ts +203 -0
- package/src/lib/graphql-change/criticality.ts +45 -0
- package/src/lib/graphql-change/graphql-change.ts +7 -5
- package/src/lib/graphql-document/components/GraphQLDocument.tsx +7 -12
- package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +1 -6
- package/src/lib/graphql-document/demo.md +1 -1
- package/src/lib/graphql-document/positioning-simple.test.ts +5 -5
- package/src/lib/graphql-document/positioning-simple.ts +1 -1
- package/src/template/components/Changelog/ChangeBase.tsx +15 -0
- package/src/template/components/Changelog/CriticalitySection.tsx +29 -0
- package/src/template/components/Changelog/changes/index.ts +1 -0
- package/src/template/components/Changelog/groups/DirectiveArgument.tsx +25 -0
- package/src/template/components/Changelog/groups/DirectiveArgumentDescription.tsx +15 -0
- package/src/template/components/Changelog/groups/DirectiveArgumentOperation.tsx +25 -0
- package/src/template/components/Changelog/groups/DirectiveDescription.tsx +12 -0
- package/src/template/components/Changelog/groups/DirectiveLocationOperation.tsx +25 -0
- package/src/template/components/Changelog/groups/DirectiveOperation.tsx +21 -0
- package/src/template/components/Changelog/groups/DirectiveUsage.tsx +137 -0
- package/src/template/components/Changelog/groups/EnumValueDeprecationReason.tsx +32 -0
- package/src/template/components/Changelog/groups/EnumValueDescription.tsx +12 -0
- package/src/template/components/Changelog/groups/EnumValueOperation.tsx +21 -0
- package/src/template/components/Changelog/groups/FieldArgument.tsx +26 -0
- package/src/template/components/Changelog/groups/FieldArgumentDescription.tsx +15 -0
- package/src/template/components/Changelog/groups/FieldArgumentOperation.tsx +26 -0
- package/src/template/components/Changelog/groups/FieldDeprecation.tsx +21 -0
- package/src/template/components/Changelog/groups/FieldDeprecationReason.tsx +33 -0
- package/src/template/components/Changelog/groups/FieldDescription.tsx +27 -0
- package/src/template/components/Changelog/groups/FieldOperation.tsx +28 -0
- package/src/template/components/Changelog/groups/InputFieldDefaultValue.tsx +16 -0
- package/src/template/components/Changelog/groups/InputFieldDescription.tsx +30 -0
- package/src/template/components/Changelog/groups/InputFieldOperation.tsx +29 -0
- package/src/template/components/Changelog/groups/ObjectTypeInterfaceOperation.tsx +25 -0
- package/src/template/components/Changelog/groups/SchemaRootType.tsx +31 -0
- package/src/template/components/Changelog/groups/TypeDescription.tsx +27 -0
- package/src/template/components/Changelog/groups/TypeOperation.tsx +27 -0
- package/src/template/components/Changelog/groups/UnionMemberOperation.tsx +21 -0
- package/src/template/components/Changelog/groups/index.ts +25 -0
- package/src/template/components/Changelog.tsx +96 -63
- package/src/template/components/ChangelogLayout.tsx +157 -0
- package/src/template/components/layouts/SidebarLayout.tsx +68 -0
- package/src/template/components/layouts/index.ts +1 -0
- package/src/template/entry.client.tsx +0 -1
- package/src/template/routes/changelog.tsx +6 -1
- package/src/template/routes/reference.tsx +25 -2
- package/src/template/routes/root.tsx +5 -105
- package/build/template/components/CodeBlockEnhancer.d.ts +0 -2
- package/build/template/components/CodeBlockEnhancer.d.ts.map +0 -1
- package/build/template/components/CodeBlockEnhancer.js +0 -175
- package/build/template/components/CodeBlockEnhancer.js.map +0 -1
- package/build/template/styles/code-block.css +0 -218
- package/src/template/components/CodeBlockEnhancer.tsx +0 -192
- package/src/template/styles/code-block.css +0 -218
@@ -32,7 +32,7 @@ describe('Simple Positioning Engine', () => {
|
|
32
32
|
it('should wrap identifiers in spans', () => {
|
33
33
|
const container = document.createElement('div')
|
34
34
|
container.innerHTML = `
|
35
|
-
<pre class="
|
35
|
+
<pre class="code-block">
|
36
36
|
<code>query GetUser {
|
37
37
|
user {
|
38
38
|
name
|
@@ -64,7 +64,7 @@ describe('Simple Positioning Engine', () => {
|
|
64
64
|
it('should handle multiple identifiers in same line', () => {
|
65
65
|
const container = document.createElement('div')
|
66
66
|
container.innerHTML = `
|
67
|
-
<pre class="
|
67
|
+
<pre class="code-block">
|
68
68
|
<code>query GetUserById($id: ID!) {</code>
|
69
69
|
</pre>
|
70
70
|
`
|
@@ -86,7 +86,7 @@ describe('Simple Positioning Engine', () => {
|
|
86
86
|
it('should get positions of wrapped identifiers', () => {
|
87
87
|
const container = document.createElement('div')
|
88
88
|
container.innerHTML = `
|
89
|
-
<pre class="
|
89
|
+
<pre class="code-block">
|
90
90
|
<code>
|
91
91
|
<span class="line"><span data-graphql-id="0-user-Field" data-graphql-name="user" data-graphql-kind="Field" data-graphql-start="0" data-graphql-end="4" data-graphql-line="1" data-graphql-column="1" data-graphql-path="user">user</span> {</span>
|
92
92
|
</code>
|
@@ -137,7 +137,7 @@ describe('Simple Positioning Engine', () => {
|
|
137
137
|
it('should skip already wrapped identifiers', () => {
|
138
138
|
const container = document.createElement('div')
|
139
139
|
container.innerHTML = `
|
140
|
-
<pre class="
|
140
|
+
<pre class="code-block">
|
141
141
|
<code><span data-graphql-id="existing">user</span> {</code>
|
142
142
|
</pre>
|
143
143
|
`
|
@@ -158,7 +158,7 @@ describe('Simple Positioning Engine', () => {
|
|
158
158
|
it('should handle empty lines gracefully', () => {
|
159
159
|
const container = document.createElement('div')
|
160
160
|
container.innerHTML = `
|
161
|
-
<pre class="
|
161
|
+
<pre class="code-block">
|
162
162
|
<code>query {
|
163
163
|
|
164
164
|
user</code>
|
@@ -32,7 +32,7 @@ export interface PositionResult {
|
|
32
32
|
}
|
33
33
|
|
34
34
|
/**
|
35
|
-
* Simplified position calculator for
|
35
|
+
* Simplified position calculator for syntax-highlighted code
|
36
36
|
*
|
37
37
|
* This version uses a more straightforward approach:
|
38
38
|
* 1. Find the line element by line number
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import type React from 'react'
|
3
|
+
|
4
|
+
interface ChangeBaseProps {
|
5
|
+
change: GraphqlChange.Change
|
6
|
+
children: React.ReactNode
|
7
|
+
}
|
8
|
+
|
9
|
+
export const ChangeBase: React.FC<ChangeBaseProps> = ({ change, children }) => {
|
10
|
+
return (
|
11
|
+
<li style={{ marginBottom: '0.5rem' }}>
|
12
|
+
{children}
|
13
|
+
</li>
|
14
|
+
)
|
15
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { CRITICALITY_CONFIG, type CriticalityLevel } from '#lib/graphql-change/criticality'
|
2
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
3
|
+
import { Heading } from '@radix-ui/themes'
|
4
|
+
import type React from 'react'
|
5
|
+
|
6
|
+
interface CriticalitySectionProps {
|
7
|
+
level: CriticalityLevel
|
8
|
+
changes: GraphqlChange.Change[]
|
9
|
+
children: React.ReactNode
|
10
|
+
}
|
11
|
+
|
12
|
+
export const CriticalitySection: React.FC<CriticalitySectionProps> = ({ level, changes, children }) => {
|
13
|
+
if (changes.length === 0) {
|
14
|
+
return null
|
15
|
+
}
|
16
|
+
|
17
|
+
const config = CRITICALITY_CONFIG[level]
|
18
|
+
|
19
|
+
return (
|
20
|
+
<section>
|
21
|
+
<Heading as='h3' size='4' mb='3'>
|
22
|
+
{config.label}
|
23
|
+
</Heading>
|
24
|
+
<ul style={{ listStyle: 'none', paddingLeft: 0, margin: 0 }}>
|
25
|
+
{children}
|
26
|
+
</ul>
|
27
|
+
</section>
|
28
|
+
)
|
29
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { ChangeBase } from '../ChangeBase.js'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const DirectiveArgument: React.FC<{ change: GraphqlChange.Group.DirectiveArgument }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `DIRECTIVE_ARGUMENT_DEFAULT_VALUE_CHANGED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Changed default value for directive <Code>@{change.meta.directiveName}</Code> argument{' '}
|
12
|
+
<Code>{change.meta.directiveArgumentName}</Code>
|
13
|
+
</ChangeBase>
|
14
|
+
)
|
15
|
+
case `DIRECTIVE_ARGUMENT_TYPE_CHANGED`:
|
16
|
+
return (
|
17
|
+
<ChangeBase change={change}>
|
18
|
+
Changed directive <Code>@{change.meta.directiveName}</Code> argument{' '}
|
19
|
+
<Code>{change.meta.directiveArgumentName}</Code> type from <Code>{change.meta.oldDirectiveArgumentType}</Code>
|
20
|
+
{' '}
|
21
|
+
to <Code>{change.meta.newDirectiveArgumentType}</Code>
|
22
|
+
</ChangeBase>
|
23
|
+
)
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const DirectiveArgumentDescription: React.FC<{ change: GraphqlChange.Group.DirectiveArgumentDescription }> = (
|
7
|
+
{ change },
|
8
|
+
) => {
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Changed description for directive <Code>@{change.meta.directiveName}</Code> argument{' '}
|
12
|
+
<Code>{change.meta.directiveArgumentName}</Code>
|
13
|
+
</ChangeBase>
|
14
|
+
)
|
15
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const DirectiveArgumentOperation: React.FC<{ change: GraphqlChange.Group.DirectiveArgumentOperation }> = (
|
7
|
+
{ change },
|
8
|
+
) => {
|
9
|
+
switch (change.type) {
|
10
|
+
case `DIRECTIVE_ARGUMENT_ADDED`:
|
11
|
+
return (
|
12
|
+
<ChangeBase change={change}>
|
13
|
+
Added argument <Code>{change.meta.addedDirectiveArgumentName}</Code> to directive{' '}
|
14
|
+
<Code>@{change.meta.directiveName}</Code>
|
15
|
+
</ChangeBase>
|
16
|
+
)
|
17
|
+
case `DIRECTIVE_ARGUMENT_REMOVED`:
|
18
|
+
return (
|
19
|
+
<ChangeBase change={change}>
|
20
|
+
Removed argument <Code>{change.meta.removedDirectiveArgumentName}</Code> from directive{' '}
|
21
|
+
<Code>@{change.meta.directiveName}</Code>
|
22
|
+
</ChangeBase>
|
23
|
+
)
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const DirectiveDescription: React.FC<{ change: GraphqlChange.Group.DirectiveDescription }> = ({ change }) => {
|
7
|
+
return (
|
8
|
+
<ChangeBase change={change}>
|
9
|
+
Changed description for directive <Code>@{change.meta.directiveName}</Code>
|
10
|
+
</ChangeBase>
|
11
|
+
)
|
12
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const DirectiveLocationOperation: React.FC<{ change: GraphqlChange.Group.DirectiveLocationOperation }> = (
|
7
|
+
{ change },
|
8
|
+
) => {
|
9
|
+
switch (change.type) {
|
10
|
+
case `DIRECTIVE_LOCATION_ADDED`:
|
11
|
+
return (
|
12
|
+
<ChangeBase change={change}>
|
13
|
+
Directive <Code>@{change.meta.directiveName}</Code> can now be used on{' '}
|
14
|
+
<Code>{change.meta.addedDirectiveLocation}</Code>
|
15
|
+
</ChangeBase>
|
16
|
+
)
|
17
|
+
case `DIRECTIVE_LOCATION_REMOVED`:
|
18
|
+
return (
|
19
|
+
<ChangeBase change={change}>
|
20
|
+
Directive <Code>@{change.meta.directiveName}</Code> can no longer be used on{' '}
|
21
|
+
<Code>{change.meta.removedDirectiveLocation}</Code>
|
22
|
+
</ChangeBase>
|
23
|
+
)
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const DirectiveOperation: React.FC<{ change: GraphqlChange.Group.DirectiveOperation }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `DIRECTIVE_ADDED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Added directive <Code>@{change.meta.addedDirectiveName}</Code>
|
12
|
+
</ChangeBase>
|
13
|
+
)
|
14
|
+
case `DIRECTIVE_REMOVED`:
|
15
|
+
return (
|
16
|
+
<ChangeBase change={change}>
|
17
|
+
Removed directive <Code>@{change.meta.removedDirectiveName}</Code>
|
18
|
+
</ChangeBase>
|
19
|
+
)
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,137 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const DirectiveUsage: React.FC<{ change: GraphqlChange.Group.DirectiveUsage }> = ({ change }) => {
|
7
|
+
const isAdded = change.type.includes(`_ADDED`)
|
8
|
+
const action = isAdded ? `Added` : `Removed`
|
9
|
+
const preposition = isAdded ? `to` : `from`
|
10
|
+
|
11
|
+
// Helper to get the directive name based on whether it's added or removed
|
12
|
+
const getDirectiveName = () => {
|
13
|
+
if (`addedDirectiveName` in change.meta) {
|
14
|
+
return change.meta.addedDirectiveName
|
15
|
+
}
|
16
|
+
if (`removedDirectiveName` in change.meta) {
|
17
|
+
return change.meta.removedDirectiveName
|
18
|
+
}
|
19
|
+
return ``
|
20
|
+
}
|
21
|
+
|
22
|
+
const directiveName = getDirectiveName()
|
23
|
+
|
24
|
+
switch (change.type) {
|
25
|
+
case `DIRECTIVE_USAGE_UNION_MEMBER_ADDED`:
|
26
|
+
return (
|
27
|
+
<ChangeBase change={change}>
|
28
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} union member{' '}
|
29
|
+
<Code>{change.meta.addedUnionMemberTypeName}</Code> on union <Code>{change.meta.unionName}</Code>
|
30
|
+
</ChangeBase>
|
31
|
+
)
|
32
|
+
case `DIRECTIVE_USAGE_UNION_MEMBER_REMOVED`:
|
33
|
+
return (
|
34
|
+
<ChangeBase change={change}>
|
35
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} union member{' '}
|
36
|
+
<Code>{change.meta.removedUnionMemberTypeName}</Code> on union <Code>{change.meta.unionName}</Code>
|
37
|
+
</ChangeBase>
|
38
|
+
)
|
39
|
+
|
40
|
+
case `DIRECTIVE_USAGE_ENUM_ADDED`:
|
41
|
+
case `DIRECTIVE_USAGE_ENUM_REMOVED`:
|
42
|
+
return (
|
43
|
+
<ChangeBase change={change}>
|
44
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} enum <Code>{change.meta.enumName}</Code>
|
45
|
+
</ChangeBase>
|
46
|
+
)
|
47
|
+
|
48
|
+
case `DIRECTIVE_USAGE_ENUM_VALUE_ADDED`:
|
49
|
+
case `DIRECTIVE_USAGE_ENUM_VALUE_REMOVED`:
|
50
|
+
return (
|
51
|
+
<ChangeBase change={change}>
|
52
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} enum value{' '}
|
53
|
+
<Code>{change.meta.enumValueName}</Code> on <Code>{change.meta.enumName}</Code>
|
54
|
+
</ChangeBase>
|
55
|
+
)
|
56
|
+
|
57
|
+
case `DIRECTIVE_USAGE_INPUT_OBJECT_ADDED`:
|
58
|
+
case `DIRECTIVE_USAGE_INPUT_OBJECT_REMOVED`:
|
59
|
+
return (
|
60
|
+
<ChangeBase change={change}>
|
61
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} input object{' '}
|
62
|
+
<Code>{change.meta.inputObjectName}</Code>
|
63
|
+
</ChangeBase>
|
64
|
+
)
|
65
|
+
|
66
|
+
case `DIRECTIVE_USAGE_FIELD_ADDED`:
|
67
|
+
case `DIRECTIVE_USAGE_FIELD_REMOVED`:
|
68
|
+
return (
|
69
|
+
<ChangeBase change={change}>
|
70
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} field <Code>{change.meta.fieldName}</Code> on
|
71
|
+
{' '}
|
72
|
+
<Code>{change.meta.typeName}</Code>
|
73
|
+
</ChangeBase>
|
74
|
+
)
|
75
|
+
|
76
|
+
case `DIRECTIVE_USAGE_SCALAR_ADDED`:
|
77
|
+
case `DIRECTIVE_USAGE_SCALAR_REMOVED`:
|
78
|
+
return (
|
79
|
+
<ChangeBase change={change}>
|
80
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} scalar <Code>{change.meta.scalarName}</Code>
|
81
|
+
</ChangeBase>
|
82
|
+
)
|
83
|
+
|
84
|
+
case `DIRECTIVE_USAGE_OBJECT_ADDED`:
|
85
|
+
case `DIRECTIVE_USAGE_OBJECT_REMOVED`:
|
86
|
+
return (
|
87
|
+
<ChangeBase change={change}>
|
88
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} object <Code>{change.meta.objectName}</Code>
|
89
|
+
</ChangeBase>
|
90
|
+
)
|
91
|
+
|
92
|
+
case `DIRECTIVE_USAGE_INTERFACE_ADDED`:
|
93
|
+
case `DIRECTIVE_USAGE_INTERFACE_REMOVED`:
|
94
|
+
return (
|
95
|
+
<ChangeBase change={change}>
|
96
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} interface{' '}
|
97
|
+
<Code>{change.meta.interfaceName}</Code>
|
98
|
+
</ChangeBase>
|
99
|
+
)
|
100
|
+
|
101
|
+
case `DIRECTIVE_USAGE_ARGUMENT_DEFINITION_ADDED`:
|
102
|
+
case `DIRECTIVE_USAGE_ARGUMENT_DEFINITION_REMOVED`:
|
103
|
+
return (
|
104
|
+
<ChangeBase change={change}>
|
105
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} argument{' '}
|
106
|
+
<Code>{change.meta.argumentName}</Code> on <Code>{change.meta.fieldName}</Code> field on{' '}
|
107
|
+
<Code>{change.meta.typeName}</Code>
|
108
|
+
</ChangeBase>
|
109
|
+
)
|
110
|
+
|
111
|
+
case `DIRECTIVE_USAGE_SCHEMA_ADDED`:
|
112
|
+
case `DIRECTIVE_USAGE_SCHEMA_REMOVED`:
|
113
|
+
return (
|
114
|
+
<ChangeBase change={change}>
|
115
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} schema
|
116
|
+
</ChangeBase>
|
117
|
+
)
|
118
|
+
|
119
|
+
case `DIRECTIVE_USAGE_FIELD_DEFINITION_ADDED`:
|
120
|
+
case `DIRECTIVE_USAGE_FIELD_DEFINITION_REMOVED`:
|
121
|
+
return (
|
122
|
+
<ChangeBase change={change}>
|
123
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} field definition{' '}
|
124
|
+
<Code>{change.meta.fieldName}</Code> on <Code>{change.meta.typeName}</Code>
|
125
|
+
</ChangeBase>
|
126
|
+
)
|
127
|
+
|
128
|
+
case `DIRECTIVE_USAGE_INPUT_FIELD_DEFINITION_ADDED`:
|
129
|
+
case `DIRECTIVE_USAGE_INPUT_FIELD_DEFINITION_REMOVED`:
|
130
|
+
return (
|
131
|
+
<ChangeBase change={change}>
|
132
|
+
{action} directive <Code>@{directiveName}</Code> {preposition} input field{' '}
|
133
|
+
<Code>{change.meta.inputFieldName}</Code> on <Code>{change.meta.inputObjectName}</Code>
|
134
|
+
</ChangeBase>
|
135
|
+
)
|
136
|
+
}
|
137
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const EnumValueDeprecationReason: React.FC<{ change: GraphqlChange.Group.EnumValueDeprecationReason }> = (
|
7
|
+
{ change },
|
8
|
+
) => {
|
9
|
+
switch (change.type) {
|
10
|
+
case `ENUM_VALUE_DEPRECATION_REASON_ADDED`:
|
11
|
+
return (
|
12
|
+
<ChangeBase change={change}>
|
13
|
+
Deprecated enum value <Code>{change.meta.enumValueName}</Code> on <Code>{change.meta.enumName}</Code>
|
14
|
+
{change.meta.addedValueDeprecationReason && <>: "{change.meta.addedValueDeprecationReason}"</>}
|
15
|
+
</ChangeBase>
|
16
|
+
)
|
17
|
+
case `ENUM_VALUE_DEPRECATION_REASON_REMOVED`:
|
18
|
+
return (
|
19
|
+
<ChangeBase change={change}>
|
20
|
+
Removed deprecation from enum value <Code>{change.meta.enumValueName}</Code> on{' '}
|
21
|
+
<Code>{change.meta.enumName}</Code>
|
22
|
+
</ChangeBase>
|
23
|
+
)
|
24
|
+
case `ENUM_VALUE_DEPRECATION_REASON_CHANGED`:
|
25
|
+
return (
|
26
|
+
<ChangeBase change={change}>
|
27
|
+
Changed deprecation reason for enum value <Code>{change.meta.enumValueName}</Code> on{' '}
|
28
|
+
<Code>{change.meta.enumName}</Code>
|
29
|
+
</ChangeBase>
|
30
|
+
)
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const EnumValueDescription: React.FC<{ change: GraphqlChange.Group.EnumValueDescription }> = ({ change }) => {
|
7
|
+
return (
|
8
|
+
<ChangeBase change={change}>
|
9
|
+
Changed description for enum value <Code>{change.meta.enumValueName}</Code> on <Code>{change.meta.enumName}</Code>
|
10
|
+
</ChangeBase>
|
11
|
+
)
|
12
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const EnumValueOperation: React.FC<{ change: GraphqlChange.Group.EnumValueOperation }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `ENUM_VALUE_ADDED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Added value <Code>{change.meta.addedEnumValueName}</Code> to enum <Code>{change.meta.enumName}</Code>
|
12
|
+
</ChangeBase>
|
13
|
+
)
|
14
|
+
case `ENUM_VALUE_REMOVED`:
|
15
|
+
return (
|
16
|
+
<ChangeBase change={change}>
|
17
|
+
Removed value <Code>{change.meta.removedEnumValueName}</Code> from enum <Code>{change.meta.enumName}</Code>
|
18
|
+
</ChangeBase>
|
19
|
+
)
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const FieldArgument: React.FC<{ change: GraphqlChange.Group.FieldArgument }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `FIELD_ARGUMENT_DEFAULT_CHANGED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Changed default value for argument <Code>{change.meta.argumentName}</Code> on field{' '}
|
12
|
+
<Code>{change.meta.fieldName}</Code> on <Code>{change.meta.typeName}</Code> from{' '}
|
13
|
+
<Code>{change.meta.oldDefaultValue}</Code> to <Code>{change.meta.newDefaultValue}</Code>
|
14
|
+
</ChangeBase>
|
15
|
+
)
|
16
|
+
case `FIELD_ARGUMENT_TYPE_CHANGED`:
|
17
|
+
return (
|
18
|
+
<ChangeBase change={change}>
|
19
|
+
Changed argument <Code>{change.meta.argumentName}</Code> type from <Code>{change.meta.oldArgumentType}</Code>
|
20
|
+
{' '}
|
21
|
+
to <Code>{change.meta.newArgumentType}</Code> on field <Code>{change.meta.fieldName}</Code> on{' '}
|
22
|
+
<Code>{change.meta.typeName}</Code>
|
23
|
+
</ChangeBase>
|
24
|
+
)
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const FieldArgumentDescription: React.FC<{ change: GraphqlChange.Group.FieldArgumentDescription }> = (
|
7
|
+
{ change },
|
8
|
+
) => {
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Changed description for argument <Code>{change.meta.argumentName}</Code> on field{' '}
|
12
|
+
<Code>{change.meta.fieldName}</Code> on <Code>{change.meta.typeName}</Code>
|
13
|
+
</ChangeBase>
|
14
|
+
)
|
15
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const FieldArgumentOperation: React.FC<{ change: GraphqlChange.Group.FieldArgumentOperation }> = (
|
7
|
+
{ change },
|
8
|
+
) => {
|
9
|
+
switch (change.type) {
|
10
|
+
case `FIELD_ARGUMENT_ADDED`:
|
11
|
+
return (
|
12
|
+
<ChangeBase change={change}>
|
13
|
+
Added argument <Code>{change.meta.addedArgumentName}</Code> to field <Code>{change.meta.fieldName}</Code> on
|
14
|
+
{' '}
|
15
|
+
<Code>{change.meta.typeName}</Code>
|
16
|
+
</ChangeBase>
|
17
|
+
)
|
18
|
+
case `FIELD_ARGUMENT_REMOVED`:
|
19
|
+
return (
|
20
|
+
<ChangeBase change={change}>
|
21
|
+
Removed argument <Code>{change.meta.removedFieldArgumentName}</Code> from field{' '}
|
22
|
+
<Code>{change.meta.fieldName}</Code> on <Code>{change.meta.typeName}</Code>
|
23
|
+
</ChangeBase>
|
24
|
+
)
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const FieldDeprecation: React.FC<{ change: GraphqlChange.Group.FieldDeprecation }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `FIELD_DEPRECATION_ADDED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Deprecated field <Code>{change.meta.fieldName}</Code> on <Code>{change.meta.typeName}</Code>
|
12
|
+
</ChangeBase>
|
13
|
+
)
|
14
|
+
case `FIELD_DEPRECATION_REMOVED`:
|
15
|
+
return (
|
16
|
+
<ChangeBase change={change}>
|
17
|
+
Removed deprecation from field <Code>{change.meta.fieldName}</Code> on <Code>{change.meta.typeName}</Code>
|
18
|
+
</ChangeBase>
|
19
|
+
)
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const FieldDeprecationReason: React.FC<{ change: GraphqlChange.Group.FieldDeprecationReason }> = (
|
7
|
+
{ change },
|
8
|
+
) => {
|
9
|
+
switch (change.type) {
|
10
|
+
case `FIELD_DEPRECATION_REASON_ADDED`:
|
11
|
+
return (
|
12
|
+
<ChangeBase change={change}>
|
13
|
+
Added deprecation reason to field <Code>{change.meta.fieldName}</Code> on <Code>{change.meta.typeName}</Code>
|
14
|
+
{change.meta.addedDeprecationReason && <>: "{change.meta.addedDeprecationReason}"</>}
|
15
|
+
</ChangeBase>
|
16
|
+
)
|
17
|
+
case `FIELD_DEPRECATION_REASON_REMOVED`:
|
18
|
+
return (
|
19
|
+
<ChangeBase change={change}>
|
20
|
+
Removed deprecation reason from field <Code>{change.meta.fieldName}</Code> on{' '}
|
21
|
+
<Code>{change.meta.typeName}</Code>
|
22
|
+
</ChangeBase>
|
23
|
+
)
|
24
|
+
case `FIELD_DEPRECATION_REASON_CHANGED`:
|
25
|
+
return (
|
26
|
+
<ChangeBase change={change}>
|
27
|
+
Changed deprecation reason for field <Code>{change.meta.fieldName}</Code> on{' '}
|
28
|
+
<Code>{change.meta.typeName}</Code> from <Code>{change.meta.oldDeprecationReason}</Code> to{' '}
|
29
|
+
<Code>{change.meta.newDeprecationReason}</Code>
|
30
|
+
</ChangeBase>
|
31
|
+
)
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const FieldDescription: React.FC<{ change: GraphqlChange.Group.FieldDescription }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `FIELD_DESCRIPTION_ADDED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Added description to field <Code>{change.meta.fieldName}</Code> on <Code>{change.meta.typeName}</Code>
|
12
|
+
</ChangeBase>
|
13
|
+
)
|
14
|
+
case `FIELD_DESCRIPTION_REMOVED`:
|
15
|
+
return (
|
16
|
+
<ChangeBase change={change}>
|
17
|
+
Removed description from field <Code>{change.meta.fieldName}</Code> on <Code>{change.meta.typeName}</Code>
|
18
|
+
</ChangeBase>
|
19
|
+
)
|
20
|
+
case `FIELD_DESCRIPTION_CHANGED`:
|
21
|
+
return (
|
22
|
+
<ChangeBase change={change}>
|
23
|
+
Changed description for field <Code>{change.meta.fieldName}</Code> on <Code>{change.meta.typeName}</Code>
|
24
|
+
</ChangeBase>
|
25
|
+
)
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const FieldOperation: React.FC<{ change: GraphqlChange.Group.FieldOperation }> = ({ change }) => {
|
7
|
+
switch (change.type) {
|
8
|
+
case `FIELD_ADDED`:
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Added field <Code>{change.meta.addedFieldName}</Code> to <Code>{change.meta.typeName}</Code>
|
12
|
+
</ChangeBase>
|
13
|
+
)
|
14
|
+
case `FIELD_REMOVED`:
|
15
|
+
return (
|
16
|
+
<ChangeBase change={change}>
|
17
|
+
Removed field <Code>{change.meta.removedFieldName}</Code> from <Code>{change.meta.typeName}</Code>
|
18
|
+
</ChangeBase>
|
19
|
+
)
|
20
|
+
case `FIELD_TYPE_CHANGED`:
|
21
|
+
return (
|
22
|
+
<ChangeBase change={change}>
|
23
|
+
Changed field <Code>{change.meta.fieldName}</Code> type from <Code>{change.meta.oldFieldType}</Code> to{' '}
|
24
|
+
<Code>{change.meta.newFieldType}</Code> on <Code>{change.meta.typeName}</Code>
|
25
|
+
</ChangeBase>
|
26
|
+
)
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { GraphqlChange } from '#lib/graphql-change/index'
|
2
|
+
import { Code } from '@radix-ui/themes'
|
3
|
+
import type React from 'react'
|
4
|
+
import { ChangeBase } from '../ChangeBase.js'
|
5
|
+
|
6
|
+
export const InputFieldDefaultValue: React.FC<{ change: GraphqlChange.Group.InputFieldDefaultValue }> = (
|
7
|
+
{ change },
|
8
|
+
) => {
|
9
|
+
return (
|
10
|
+
<ChangeBase change={change}>
|
11
|
+
Changed default value for input field <Code>{change.meta.inputFieldName}</Code> on{' '}
|
12
|
+
<Code>{change.meta.inputName}</Code> from <Code>{change.meta.oldDefaultValue}</Code> to{' '}
|
13
|
+
<Code>{change.meta.newDefaultValue}</Code>
|
14
|
+
</ChangeBase>
|
15
|
+
)
|
16
|
+
}
|