HTTP request to 'http://localhost:7007/api/v0/collection'
failed with status 'Internal Server Error': {"error":
"Query failed: Model kjzl6hvfrbw6c7keo17n66rxyo21nqqaa9lh491jz16od43nokz7ksfcvzi6bwc
is not indexed on this node"}
Ok, my problem was I had v0.3.0-rc.1 of @composedb/cli installed. Running the most recent version resolves the indexing issue.
When I run npx @composedb/cli@0.3.0 graphql:server --ceramic-url=http://localhost:7007 --graphiql --port=5001 runtime-composite.json --did-private-key=$(cat composedb.private.key)(or npx @composedb/cli@latest), I get the following error:
Using DID did:key:z6MkfTq7FKj3mU7LgA4PaU959oLZ1pqUJPTfHyC3pk5KRu4v
Cannot use GraphQLScalarType “String” from another module or realm.
Ensure that there is only one instance of “graphql” in the node_modules directory. If different versions of “graphql” are the dependencies of other relied on modules, use “resolutions” to ensure only one version is installed.
Duplicate “graphql” modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.
Y’all have two different versions of the graphql library in your CLI’s search path. You need to run yarn list | grep graphql in the project directory to determine what those versions are & then add a "resolutions": { "graphql": "2.3.4" }(or whatever the most recent used version is) to your package.json to force everything to use that version.
(Or update the graphql libraries to all be the same version.)
Then rerun yarn.
I’d submit a PR if I knew where to find the code? What’s the repo?