-
Get Graphql Schema Intropection SDL https://stackoverflow.com/questions/37397886/get-graphql-whole-schema-query
-
Convert Graphql Schema Intropection SDL to Graphql Schema https://codesandbox.io/s/graphql-introspection-sdl-forked-g89hv6?file=/index.js
-
Detect Graphql Schema diff https://sudos.tools/graphql-diff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const safeFunc = <T extends (...args: any[]) => any>( | |
func: T, | |
args: Parameters<T>, | |
defaultValue: ReturnType<T> | |
): [error: any, data: ReturnType<T>] => { | |
try { | |
const data = func(...args) | |
return [null, data] | |
} catch (e) { | |
return [e, defaultValue] |