I googled a bit, but couldn't find anyone else complaining about this issue. I am using amplify mock
to test GraphQL queries locally. Everything works as expected, mutations do insert data to Sqlite DB just fine, however query results do not show in GraphiQL UI. I checked the browser developer tools console for any errors, but none shown. The HTTP response does show the expected results. Tried in Chrome and Safari only to see same behavior. I am on MacOS Monterey. Any tips appreciated.
query MyQuery {
getBlog(id: "73545774-56dd-45d9-b34c-ada280cc7ef4") {
id
name
updatedAt
createdAt
}
}
The ID shown in the query above is a record that exists in Sqlite DB. it was inserted through a Mutation query. The browser tab does show the below correct response.
{
"data": {
"getBlog": {
"id": "73545774-56dd-45d9-b34c-ada280cc7ef4",
"name": "First Blog",
"updatedAt": "2022-07-27T17:55:02.052Z",
"createdAt": "2022-07-27T17:55:02.052Z"
}
}
}
However, the GraphiQL interface not render the results correctly. It does show some expand/collapse arrow icons. See attached screenshot:
Results pane in GraphiQL shows empty
Why would GraphiQL interface behave this way? Any suggestions?
This is my setup:
node -v
v16.13.0
npm -v
8.5.2
amplify -v
9.1.0
Google Chrome
103.0.5060.134 (Official Build) (x86_64)
npm create-react-app myapp
cd myapp
npm install @aws-amplify/cli -g
amplify init
amplify add api
DYNAMODB_ENDPOINT='http://localhost:62224' amplify mock
...
AppSync Mock endpoint is running at http://10.0.0.180:20002