@jpinto ,
That was the session I wanted to get into but they closed the doors as I was getting there. I'm anxiously awaiting that video.
I pasted your code into my graphiql and changed the course ID to one of my courses and it worked.
Since Canvas has announced that GraphQL is the future of API, I need to learn this stuff. Thank you for providing some real working applications. I was getting a similar error with some of the stuff I was trying last night so it was good to get something that actually worked.
I don't doubt that you're getting the error, though, as I'm able to get it with a different request by including content.
This works.
query MyQuery {
allCourses {
modulesConnection {
nodes {
name
moduleItems {
_id
}
}
}
}
}
Adding the content doesn't.
query MyQuery {
allCourses {
modulesConnection {
nodes {
name
moduleItems {
_id
content {
... on Page {
title
}
}
}
}
}
}
}
It generates the same error you got.
Error: Request failed with status code 500
at LYNF.e.exports (https://du11hjcvx0uqb.cloudfront.net/br/dist/webpack-production/main-e-154b446262.js:1693:37)
at Rn+g.e.exports (https://du11hjcvx0uqb.cloudfront.net/br/dist/webpack-production/main-e-154b446262.js:1984:29)
at XMLHttpRequest.h.<computed> (https://du11hjcvx0uqb.cloudfront.net/br/dist/webpack-production/main-e-154b446262.js:7382:1)