I just started integrating ComposeDB into our application and I am facing a CORS issue when trying to push data to the GraphQL server. Note: Reading from the GraphQL endpoint seems to work.
CORS errors - especially when inconsistent I have found are when I am hitting a rate limit on some third party services (it works 90% of the time, and then sometimes we get a block of CORS errors). I havenāt drilled to the core of the issue yet, but a true CORS error shouldnāt really be inconsistent.
I have more issues testing a local API to local FE with CORS sometimes than deploying to a test/staging site live. I canāt fully explain this either yet (maybe my fault) but for sanity checks its something to try.
By GraphQL server, do you mean the server exposed when by the @composedb/devtools-node APIs or using the composedb graphql:server command from the CLI please?
If so, this is not the URL you need to provide to the ComposeClient parameters, the ceramic value must be the URL of the Ceramic server, not a GraphQL endpoint.
Also please note that the GraphQL server exposed by the devtools is only meant to enable local interactions with the compositeās data when developing apps, notably with GraphiQL. Itās not a server your app should communicate with directly.
Thanks Paul, I was making the calls to http://localhost:5005 which is the GraphQL server exposed by @composedb/devtools-node. Changing this to http://localhost:7007 is working fine.