Skip to content

Commit

Permalink
fix(docs): fixed documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
BowlingX committed Aug 13, 2021
1 parent 0064e22 commit dbfedb1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ query someQuery($argValue: String! $shouldKeep: Boolean!) {
}
```

If `shouldKeep` in this example is true, it will remove the whole `field` query including arguments.
If `$shouldKeep` in this example is `false`, it will remove the whole `field` query including arguments.
It will also clean up all variables that might be used (if not used by other fields).

To prevent Apollo Cache issues it will fill the field with `null` when returned from the server.
2 changes: 1 addition & 1 deletion src/apollo/__tests__/KeepLink.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { print } from 'graphql/language/printer'
import { removeIgnoreSetsFromDocument } from '../KeepLink'
import { setInObject } from '../utils'

describe('IgnoreLink', () => {
describe('KeepLink', () => {
const query = gql`
query someQuery($shouldKeep: Boolean!) {
test {
Expand Down
12 changes: 6 additions & 6 deletions src/apollo/__tests__/__snapshots__/KeepLink.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[` 1`] = `
"
`;

exports[`IgnoreLink Aliases should properly map aliases 1`] = `
exports[`KeepLink Aliases should properly map aliases 1`] = `
"query someQuery {
aliasForDeeply: deeply {
nested {
Expand All @@ -26,7 +26,7 @@ fragment someOtherFragment on Type
"
`;

exports[`IgnoreLink Field Arguments should keep variables if they are used elsewhere 1`] = `
exports[`KeepLink Field Arguments should keep variables if they are used elsewhere 1`] = `
"query someQuery($argValue: String!) {
someOther {
subFieldOther(someArg: $argValue) {
Expand All @@ -37,7 +37,7 @@ exports[`IgnoreLink Field Arguments should keep variables if they are used elsew
"
`;

exports[`IgnoreLink Field Arguments should remove argument variables if exists 1`] = `
exports[`KeepLink Field Arguments should remove argument variables if exists 1`] = `
"query someQuery {
someOther {
subFieldOther
Expand All @@ -46,7 +46,7 @@ exports[`IgnoreLink Field Arguments should remove argument variables if exists 1
"
`;

exports[`IgnoreLink Fragment should work with fragments 1`] = `
exports[`KeepLink Fragment should work with fragments 1`] = `
"query someQuery {
deeply {
nested {
Expand All @@ -59,7 +59,7 @@ fragment queryFragment on Type
"
`;

exports[`IgnoreLink should remove directives and fields if shouldKeep is false 1`] = `
exports[`KeepLink should remove directives and fields if shouldKeep is false 1`] = `
"query someQuery {
test {
some
Expand All @@ -68,7 +68,7 @@ exports[`IgnoreLink should remove directives and fields if shouldKeep is false 1
"
`;

exports[`IgnoreLink should should keep fields, but remove directives if shouldKeep is true 1`] = `
exports[`KeepLink should should keep fields, but remove directives if shouldKeep is true 1`] = `
"query someQuery {
test {
some
Expand Down

0 comments on commit dbfedb1

Please sign in to comment.