Skip to content

Commit 6c85abf

Browse files
committed
prettier
1 parent 18ed602 commit 6c85abf

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

website/src/pages/docs/commands/diff.mdx

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,43 +201,53 @@ get passed to `http://your-schema-2/graphql`.
201201

202202
<Callout>Note: `--left-header` and `--right-header` overrides the `--header` flags.</Callout>
203203

204-
205204
## Support for Custom Directives
206205

207-
GraphQL Inspector offers enhanced support for custom directives, allowing users to easily detect changes in directive usage within GraphQL schemas. This feature greatly improves the capabilities of schema diffing, enabling comprehensive tracking of modifications related to custom directives across different schema versions.
206+
GraphQL Inspector offers enhanced support for custom directives, allowing users to easily detect
207+
changes in directive usage within GraphQL schemas. This feature greatly improves the capabilities of
208+
schema diffing, enabling comprehensive tracking of modifications related to custom directives across
209+
different schema versions.
208210

209211
### How to Use
210212

211-
1. **Define Custom Directives:** Begin by defining custom directives within your GraphQL schemas. Specify their usage on various schema elements such as types, fields, arguments, and more.
213+
1. **Define Custom Directives:** Begin by defining custom directives within your GraphQL schemas.
214+
Specify their usage on various schema elements such as types, fields, arguments, and more.
215+
212216
```graphql
213217
directive @customDirective on FIELD_DEFINITION
214218
```
215219

216-
2. **Run Schema Diff:** Utilize the diff command provided by GraphQL Inspector. Specify the paths or URLs to the old and new schema files. Make sure that both schemas include the custom directives you want to track.
220+
2. **Run Schema Diff:** Utilize the diff command provided by GraphQL Inspector. Specify the paths or
221+
URLs to the old and new schema files. Make sure that both schemas include the custom directives
222+
you want to track.
223+
217224
```bash
218225
graphql-inspector diff OLD_SCHEMA NEW_SCHEMA
219226
```
220227

221-
Replace `OLD_SCHEMA` and `NEW_SCHEMA` with the paths or URLs pointing to your old and new schemas respectively.
228+
Replace `OLD_SCHEMA` and `NEW_SCHEMA` with the paths or URLs pointing to your old and new schemas
229+
respectively.
222230

223-
3. **Review Changes:** After executing the diff command, GraphQL Inspector will analyze the schemas and identify any modifications related to custom directive usage. The output will provide detailed information about the detected changes, categorized based on their impact.
231+
3. **Review Changes:** After executing the diff command, GraphQL Inspector will analyze the schemas
232+
and identify any modifications related to custom directive usage. The output will provide
233+
detailed information about the detected changes, categorized based on their impact.
224234

225235
![Result](/assets/img/diff-result.png)
226236

227237
### Example
228238

229239
```graphql filename="OLD_SCHEMA"
230240
input Foo {
231-
a: String
232-
b: String
241+
a: String
242+
b: String
233243
}
234244
```
235245

236246
```graphql filename="NEW_SCHEMA"
237247
directive @foo on INPUT_FIELD_DEFINITION
238248
input Foo {
239-
a: String @foo
240-
b: String
249+
a: String @foo
250+
b: String
241251
}
242252
```
243253

@@ -255,4 +265,4 @@ GraphQL Inspector's support for custom directives covers various schema elements
255265
- ENUM
256266
- ENUM_VALUE
257267
- INPUT_OBJECT
258-
- INPUT_FIELD_DEFINITION
268+
- INPUT_FIELD_DEFINITION

0 commit comments

Comments
 (0)