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

BUG: Sample Graphql query fails in 'Interact with data' section #79

Open
daniel0ar opened this issue Mar 28, 2024 · 0 comments
Open

BUG: Sample Graphql query fails in 'Interact with data' section #79

daniel0ar opened this issue Mar 28, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@daniel0ar
Copy link

Describe the bug
Compiling composites shown at the "Create your composite" pull different models than those in the docs (expect: Post and SimpleProfile, getting: MyModel and SimpleProfile). Then when executing the first query in the 'Interact with data' section the query for postIndex fails.
My assumption: model stream IDs on clay testnet are outdated in the docs, or may be fetched from mainnet.

To Reproduce
Steps to reproduce the behavior (following the Getting Started guide):

  1. Create the composite:
composedb composite:from-model kjzl6hvfrbw6c5ajfmes842lu09vjxu5956e3xq0xk12gp2jcf9s90cagt2god9 kjzl6hvfrbw6cb905umdi33gp1em1sp7b235z2h2orphj2p14by6llq9gwynsaf --ceramic-url=http://localhost:7007 --output=my-first-composite.json
  1. Deploy composite
composedb composite:deploy my-first-composite.json --ceramic-url=http://localhost:7007 --did-private-key=your-private-key
  1. Compile composite
composedb composite:compile my-first-composite.json runtime-composite.json
  1. Start Graphiql with compiled composite file
composedb graphql:server --ceramic-url=http://localhost:7007 --graphiql runtime-composite.json --did-private-key=your-private-key --port=5005
  1. Open http://localhost:5005/graphql and run query:
query{
  postIndex(first: 2) {
    edges {
      node {
        text
      }
    }
  }
}
  1. See error:
{
  "errors": [
    {
      "message": "Cannot query field \"postIndex\" on type \"Query\".",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ]
    }
  ]
}

Expected behavior
Fetched models should match to Post and SimpleProfile, so that the query can be run.

Machine, OS, browser information (please complete the following information):
Linux, PopOs 22.04, Firefox. Node 20.11.1, npm 10.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant