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

yarn codegen command fail to load schema from the server? #1597

Open
saher-elgendy opened this issue May 12, 2022 · 0 comments
Open

yarn codegen command fail to load schema from the server? #1597

saher-elgendy opened this issue May 12, 2022 · 0 comments

Comments

@saher-elgendy
Copy link

saher-elgendy commented May 12, 2022

I can't start the project, i got this error when i run yarn codgen command:

 √ Parse configuration
  > Generate outputs
    > Generate ./src/graphql/types.tsx
      × Load GraphQL schemas
        → Failed to load schema
        Load GraphQL documents
        Generate


 Found 1 error

  × ./src/graphql/types.tsx
    Failed to load schema from ../WhatsApp-Clone-Server/modules/*/index.ts:


      Unable to find any GraphQL type definitions for the following pointers:

          - ../WhatsApp-Clone-Server/modules/*/index.ts

        Error:
      Unable to find any GraphQL type definitions for the following pointers:

          - ../WhatsApp-Clone-Server/modules/*/index.ts
 at prepareResult (E:\saher dev\what's app full\WhatsApp-Clone-Client-React\WhatsApp-Clone-Client-React\node_modules\@graphql-t
oolkit\core\index.cjs.js:1138:15)
    at loadTypedefs (E:\saher dev\what's app full\WhatsApp-Clone-Client-React\WhatsApp-Clone-Client-React\node_modules\@graphql-to
olkit\core\index.cjs.js:1108:12)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Object.loadSchema (E:\saher dev\what's app full\WhatsApp-Clone-Client-React\WhatsApp-Clone-Client-React\node_modules\
@graphql-toolkit\core\index.cjs.js:1161:21)
    at async loadSchema (E:\saher dev\what's app full\WhatsApp-Clone-Client-React\WhatsApp-Clone-Client-React\node_modules\@graphq
l-codegen\cli\bin.js:396:24)
    at async E:\saher dev\what's app full\WhatsApp-Clone-Client-React\WhatsApp-Clone-Client-React\node_modules\@graphql-codegen\cl
i\bin.js:763:55
    at async Task.task (E:\saher dev\what's app full\WhatsApp-Clone-Client-React\WhatsApp-Clone-Client-React\node_modules\@graphql
-codegen\cli\bin.js:618:17)

        GraphQL Code Generator supports:
          - ES Modules and CommonJS exports (export as default or named export "schema")
          - Introspection JSON File
          - URL of GraphQL endpoint
          - Multiple files with type definitions (glob expression)
          - String in config file

        Try to use one of above options and run codegen again.
    Error: Failed to load schema
        at loadSchema (E:\saher dev\what's app full\WhatsApp-Clone-Client-React\WhatsApp-Clone-Client-React\node_modules\@graphql-
codegen\cli\bin.js:406:15)
        at processTicksAndRejections (internal/process/task_queues.js:93:5)
Failed to compile.
@saher-elgendy saher-elgendy changed the title yarn codegen comman fail to generate types.tsx? yarn codegen command fail to generate types.tsx? May 12, 2022
@saher-elgendy saher-elgendy changed the title yarn codegen command fail to generate types.tsx? yarn codegen command fail to load schema? May 13, 2022
@saher-elgendy saher-elgendy changed the title yarn codegen command fail to load schema? yarn codegen command fail to load schema from the server? May 13, 2022
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