graphiql icon indicating copy to clipboard operation
graphiql copied to clipboard

GraphQL with workspace

Open pranko17 opened this issue 3 years ago • 5 comments

Is there an existing issue for this?

  • [ ] I have searched the existing issues

Current Behavior

I have error GraphQL Config file is not available in the provided config directory when open workspace with several projects and one of then has gql. If I open project all worked.

Expected Behavior

No response

Steps To Reproduce

No response

Module pattern

  • [ ] graphiql-umd
  • [ ] graphiql-esm
  • [ ] graphiql-commonjs

Environment

- GraphiQL Version:
- OS:
- Browser:
- Bundler:
- `react` Version:
- `graphql` Version:

Anything else?

No response

pranko17 avatar Oct 23 '22 16:10 pranko17

@pranko17 workspaces is not supported yet, we are adopting support soon!

acao avatar Oct 23 '22 19:10 acao

@pranko17 workspaces is not supported yet, we are adopting support soon!

Any updates for this?

awx-josh-fu avatar May 17 '23 09:05 awx-josh-fu

@acao Any updates on this? I'm still facing GraphQL Config file is not available in the provided config directory in multi-root workspaces.

levrik avatar Jun 28 '24 11:06 levrik

@acao Any updates on this? I'm still facing GraphQL Config file is not available in the provided config directory in multi-root workspaces.

using package.json as my config file on each of my projects worked for me, try it.

// package.json

{
  "graphql": {
    "schema": "./gqlGen/schema.gql",
    "documents": "./graphql/**/*.{graphql,js,ts,jsx,tsx,gql}"
  },
}

dagimg-dot avatar Jan 20 '25 19:01 dagimg-dot

Changing the order of the workspace folders worked for me.

It was trying to access the config file from the first workspace folder, rearranging the folder with the config to the first position fixed the issue.

tajbowness avatar Jun 25 '25 03:06 tajbowness