Mirror: The small sibling of the graphql package, slimmed down for client-side libraries.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Upgrade to graphql@16.1.0

+54 -22
+37 -15
alias/error/GraphQLError.mjs
··· 36 36 } 37 37 } 38 38 39 + toJSON() { 40 + const formattedError = { message: this.message }; 41 + 42 + if (this.locations != null) formattedError.locations = this.locations; 43 + if (this.path != null) formattedError.path = this.path; 44 + if (this.extensions != null && Object.keys(this.extensions).length > 0) 45 + formattedError.extensions = this.extensions; 46 + return formattedError; 47 + } 48 + 39 49 toString() { 40 - return printError(this); 50 + let output = error.message; 51 + 52 + if (error.nodes) { 53 + for (const node of error.nodes) { 54 + if (node.loc) { 55 + output += '\n\n' + printLocation(node.loc); 56 + } 57 + } 58 + } else if (error.source && error.locations) { 59 + for (const location of error.locations) { 60 + output += '\n\n' + printSourceLocation(error.source, location); 61 + } 62 + } 63 + 64 + return output; 41 65 } 42 66 } 43 67 44 68 /** 45 69 * Prints a GraphQLError to a string, representing useful location information 46 70 * about the error's position in the source. 71 + * 72 + * @deprecated Please use `error.toString` instead. Will be removed in v17 47 73 */ 48 74 export function printError(error) { 49 - let output = error.message; 50 - 51 - if (error.nodes) { 52 - for (const node of error.nodes) { 53 - if (node.loc) { 54 - output += '\n\n' + printLocation(node.loc); 55 - } 56 - } 57 - } else if (error.source && error.locations) { 58 - for (const location of error.locations) { 59 - output += '\n\n' + printSourceLocation(error.source, location); 60 - } 61 - } 75 + return error.toString(); 76 + } 62 77 63 - return output; 78 + /** 79 + * Given a GraphQLError, format it according to the rules described by the 80 + * Response Format, Errors section of the GraphQL Specification. 81 + * 82 + * @deprecated Please use `error.toString` instead. Will be removed in v17 83 + */ 84 + export function formatError(error) { 85 + return error.toJSON(); 64 86 }
+4 -4
alias/language/blockString.mjs
··· 2 2 return '"""\n' + JSON.stringify(str).slice(1, -1) + '\n"""'; 3 3 } 4 4 5 - export function dedentBlockStringValue(str) { 6 - return str; 5 + export function isPrintableAsBlockString(value) { 6 + return true; 7 7 } 8 8 9 - export function getBlockStringIndentation(str) { 10 - return 0; 9 + export function dedentBlockStringLines(lines) { 10 + return lines; 11 11 }
+7 -2
alias/language/visitor.mjs
··· 1 - import { getVisitFn, visitInParallel, BREAK } from 'graphql/language/visitor'; 1 + import { 2 + getEnterLeaveForKind, 3 + getVisitFn, 4 + visitInParallel, 5 + BREAK, 6 + } from 'graphql/language/visitor'; 2 7 3 - export { getVisitFn, visitInParallel, BREAK }; 8 + export { getEnterLeaveForKind, getVisitFn, visitInParallel, BREAK }; 4 9 5 10 export function visit(node, visitor) { 6 11 const path = [];
+1 -1
package.json
··· 37 37 "eslint": "^7.32.0", 38 38 "eslint-config-prettier": "^8.3.0", 39 39 "eslint-plugin-prettier": "^4.0.0", 40 - "graphql": "^16.0.0-alpha.5", 40 + "graphql": "^16.1.0", 41 41 "husky-v4": "^4.3.8", 42 42 "jest": "^27.1.0", 43 43 "lint-staged": "^11.1.2",
+5
yarn.lock
··· 1795 1795 resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.0.0-alpha.5.tgz#8ae76728e91a50c59197a03cdbad9beb7fb9f704" 1796 1796 integrity sha512-C663Sh9qqetzqo0LbNrcptpQw8lTAOm8EF6rCd3tVAjTXTOkGbevZ67TtVb9WrkYQvNtFPlAFLVnqnkAGcVpYA== 1797 1797 1798 + graphql@^16.1.0: 1799 + version "16.1.0" 1800 + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.1.0.tgz#83bebeae6e119766d04966f09de9305be7fd44e5" 1801 + integrity sha512-+PIjmhqGHMIxtnlEirRXDHIzs0cAHAozKG5M2w2N4TnS8VzCxO3bbv1AW9UTeycBfl2QsPduxcVrBvANFKQhiw== 1802 + 1798 1803 has-bigints@^1.0.1: 1799 1804 version "1.0.1" 1800 1805 resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113"