Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails when a field doesn't have a type #29

Open
donald-richardson-dxd opened this issue Jan 24, 2023 · 0 comments
Open

Fails when a field doesn't have a type #29

donald-richardson-dxd opened this issue Jan 24, 2023 · 0 comments

Comments

@donald-richardson-dxd
Copy link

I'm not sure why the field doesn't have a type but it's straight from buildClientSchema from an introspection query.

I modified the top of generateQueryRecursive as follows to fix:

      let curType = field.type;
  
      if(curType === undefined)
      {
        return {
          queryStr: '    '.repeat(curDepth) + field.name,
          argumentsDict
        }
      }
  
      while (curType.ofType) curType = curType.ofType;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant