Right now its only support input as GraphQLSchema or path of schema but in some cases like where we using graphql-import then in this case it throws an error. It should be nice to have an option to pass schema as string.
For example :
const { generateTypeScriptTypes } = require("graphql-schema-typescript"); generateTypeScriptTypes("type Query{ hello: string }", path);
Right now its only support input as GraphQLSchema or path of schema but in some cases like where we using
graphql-import
then in this case it throws an error. It should be nice to have an option to pass schema as string. For example :const { generateTypeScriptTypes } = require("graphql-schema-typescript"); generateTypeScriptTypes("type Query{ hello: string }", path);