Is there a resource with a set of working GraphQL queries? I'm still mystified by it and the graphiql interface, although I suspect a ten minute intro video might help get me over the hump.
There are some resouces and example queries posted and listed in Awesome CanvasLMS #CanvasGraphQL
And while not a tutorial video, I put some videos of setting up and running some queries in Problems with using GraphiQL code in Insomnia
This is definitely an area that needs more community documentation.
As best I can tell, right now, GraphQL doesn't actually allow you to query (search) much, and is mostly about returning connected information once you have an item ID. I have not found a way to search for a set of courses for example and then do a query on those courses, or to search for a specific assignment and do something on that assignment. If I have an ID already and don't care about filtering the data, then GraphQL seems to work.
I'd love for someone to tell me that I'm wrong FWIW.
For example, I was asked to get data from a bunch of assignments in a set of courses. My approach at the moment is to use the REST API to identify the assignments, and then I can use GraphQL to return the data I want about that assignment in just one call, in this case, the name, email and when submitted.
query MyQuery2 <SPAN class="punctuation token">{</SPAN><BR /> <SPAN class="token function">assignment</SPAN><SPAN class="punctuation token">(</SPAN>id<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"3810829"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN><BR /> id<BR /> name<BR /> course <SPAN class="punctuation token">{</SPAN><BR /> courseCode<BR /> <SPAN class="punctuation token">}</SPAN><BR /> submissionsConnection <SPAN class="punctuation token">{</SPAN><BR /> nodes <SPAN class="punctuation token">{</SPAN><BR /> submittedAt<BR /> user <SPAN class="punctuation token">{</SPAN><BR /> name<BR /> email<BR /> <SPAN class="punctuation token">}</SPAN><BR /> <SPAN class="punctuation token">}</SPAN><BR /> pageInfo <SPAN class="punctuation token">{</SPAN><BR /> endCursor<BR /> hasNextPage<BR /> <SPAN class="punctuation token">}</SPAN><BR /> <SPAN class="punctuation token">}</SPAN><BR /> <SPAN class="punctuation token">}</SPAN><BR /><SPAN class="punctuation token">}</SPAN><BR /><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
If I'm on the wrong track, please do let me know!
As the output in graphiql is JSON and hard to read I copy the output and paste it to a JSON-to-CSV converter (eg. https://www.convertcsv.com/json-to-csv.htm ) and export to Excel format. Then I get a more readable output with option to search, sort and filter.
Hi everyone, I am seeking some insight into how Canvas LMS handles HTTP errors and how they are reflected in the logs versus the user interface. We are currently observing the following behavior in our environment: Log-only errors: We are seeing 500 (Internal Server Error) and 503 (Service Unavailable) errors recorded in…
I looked through the LTI Variable Substitutions documentation and while there are variable substitutions available for Canvas.term.name and Canvas.term.id (which is the Canvas incremented ID like "104"), I was surprised to see there was no option for Canvas.term.sisSourceId I tried testing other possible variants that may…
Summary:The Learning Mastery Gradebook allows drag-and-drop reordering of outcome columns, and this triggers a call to /api/v1/courses/:course_id/assign_outcome_order. The API returns 204 No Content (success), but the column order does not persist after page refresh. Steps to Reproduce: Open Learning Mastery Gradebook for…
I'm building a tool for my institution that imports grades from another LTI tool into Canvas so instructors can automate late assignment policies not otherwise supported by Canvas. I'm trying to use the LTIv1.3 ID which is readily available on the LTI-side as a link to the student record on Canvas, but I can't find the ID…
How can one track Canvas Media use without having the reports available from Canvas Studio? Checking API endpoints and the Data 2 schema, there do not seem to be dedicated Canvas Media endpoints. Am I missing some? A method I've considered is using the body field of the wiki_pages table, as this contains the html code of…