[SOLVED] Error trying to resolve field 'defaultValue'

I have…

  • [ ] Checked the logs and have provided the logs if I found something suspicious there

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [ ] Performance issue
  • [x] Documentation issue or request

Current behavior

I am trying to generate GraphQL schemes locally using graphql-codegen --config ./projects/ql-api-client/src/lib/schema/config.yml command. but I am getting the following error
Unable to download schema from remote: Error trying to resolve field 'defaultValue'.

Expected behavior

Minimal reproduction of the problem

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [x] Cloud version

Version: [VERSION]

Browser:

  • [x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

Do you have the yml for me, so I can reproduce it?

schema:
  - https://cloud.squidex.io/api/content/vannatest/graphql:
      headers:
        Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IlYzV0d4cU5rcWlpNl9OM2l4Wk9xY3ciLCJ0eXAiOiJhdCtqd3QifQ.eyJuYmYiOjE2MDIwNDM0ODEsImV4cCI6MTYwMjA0NzA4MSwiaXNzIjoiaHR0cHM6Ly9jbG91ZC5zcXVpZGV4LmlvL2lkZW50aXR5LXNlcnZlciIsImNsaWVudF9pZCI6InNxdWlkZXgtZnJvbnRlbmQiLCJzdWIiOiI1ZTlmYTE5NTRkNzdmZDAwMDE4MjU5YzkiLCJhdXRoX3RpbWUiOjE1OTYwNjQwMDIsImlkcCI6IkdpdEh1YiIsImVtYWlsIjoiam9uYXRoYW5jaGFzZUBvdXRsb29rLmNvbSIsImp0aSI6IkY3NDE0RDBDNzVGQ0E3OTg0MEEwQzdFQ0FFMUQ5RjBDIiwic2lkIjoiNXJEMTZ4aEJDVEFGdm5mRjZKVm5CUSIsImlhdCI6MTYwMjA0MzQ4MSwic2NvcGUiOlsic3F1aWRleC1hcGkiLCJvcGVuaWQiLCJwcm9maWxlIiwiZW1haWwiLCJzcXVpZGV4LXByb2ZpbGUiLCJyb2xlIiwicGVybWlzc2lvbnMiXSwiYW1yIjpbImV4dGVybmFsIl19.mkoqjA5ewWz85bFTPJtEMfVGSPHt7I5OfP6Zl83Gq1gsuljkxmWoX0ww0EAtlxSGrhaVS5mjoi9V-4G5zgcF7LmsDRPaxgUTOrzbpjkncHxdqXkI8jgBMlskjnQvVw0G16-2k-t3dpQfH_cJmIR5yBNgSrArGDV8wzwa-rwxpyAW7s5Rs1GqNiXrnvv4nM3LaSa5vcZbvUvoqSn_VTv01ANusr39YivpoI_GAY_C9N0qQfGGTWlGnVdJILt3--JrKGjyId6Sn8U8VQfDxai5xAJ0xu61n1Fw3UuK5vty2NY4W5Cew99KbVpdS7IcWKeVvY7mBJrhpE6AG5U1plrQeA
generates:
  ./projects/ql-api-client/src/lib/schema/graphql.ts:
    plugins:
      - typescript
      - typescript-operations
1 Like

Thank you very much, I am working on this now and can reproduce it.

I have solved this issue.

1 Like

Thanks @Sebastian, I am able to generate the code.

1 Like