Closed damau closed 2 years ago
Thanks so much for this library!!!👏 It's ace.
My server side schema plugin generates a schema as follows:
schema { query: RootQueryType mutation: RootMutationType }
yarn gqlg --schemaFilePath ./codegen/schema.graphql --destDirPath ./src/generated/schema --depthLimit 4 # produces src/generated/schema/mutations src/generated/schema/query
yarn gqlg --schemaFilePath ./codegen/schema.graphql --destDirPath ./src/generated/schema --depthLimit 4 # produces src/generated/schema/undefined
I imagine the above problem is fairly common given that my schema above is auto-generated (Absinthe - Elixir)
Additionally the regex is parsing only what comes from this schema object i.e:
gqlSchema.getQueryType().name = RootQueryType gqlSchema.getMutationType().name = RootMutationType
So it should be fairly stable. Unless the below is common:
schema { query: RootQueryMutationType mutation: RootMutationQueryType }
Though I hope not. I can add a stricter Regex if required. Or something not using a Regex if you like.
Thank you🎉 @damau
Thanks @timqian
Thanks so much for this library!!!👏 It's ace.
Bug Fix
Schema
My server side schema plugin generates a schema as follows:
Expected
Actual - fixed in this PR
General Info
I imagine the above problem is fairly common given that my schema above is auto-generated (Absinthe - Elixir)
Additionally the regex is parsing only what comes from this schema object i.e:
So it should be fairly stable. Unless the below is common:
Though I hope not. I can add a stricter Regex if required. Or something not using a Regex if you like.