dangcuuson / graphql-schema-typescript

Generate TypeScript from GraphQL's schema type definitions
191 stars 36 forks source link

Please add support of graphql schema as string type #12

Closed workventure-ashish closed 6 years ago

workventure-ashish commented 6 years ago

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);

dangcuuson commented 6 years ago

I have published version 1.2.4 that should fix this issue. Please check it out :)

workventure-ashish commented 6 years ago

Awesome, Thanks :)