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

Error when querying schools #24

Open
lmy0125 opened this issue Sep 15, 2024 · 1 comment
Open

Error when querying schools #24

lmy0125 opened this issue Sep 15, 2024 · 1 comment

Comments

@lmy0125
Copy link

lmy0125 commented Sep 15, 2024

I have been using this great source for my own project, but recently I found that it was not able to fetch data anymore, where ratings.searchSchool('michigan technological university') returns an error.
Using v2.2.1
Thank you

ClientError: Cannot query field "autocomplete" on type "Query".: {"response":{"data":null,"errors":[{"message":"Cannot query field "autocomplete" on type "Query".","locations":[{"line":6,"column":3}]}],"status":200,"headers":{}},"request":{"query":"\nquery AutocompleteSearchQuery(\n $query: String!\n)\n{\n autocomplete(query: $query) {\n schools {\n edges {\n node {\n id\n name\n city\n state\n }\n }\n }\n }\n}","variables":{"query":"michigan technological university"}}}
at /Users/lmy/Documents/Projects/BrightOcean/u-social/node_modules/graphql-request/dist/index.js:340:31
at step (/Users/lmy/Documents/Projects/BrightOcean/u-social/node_modules/graphql-request/dist/index.js:63:23)
at Object.next (/Users/lmy/Documents/Projects/BrightOcean/u-social/node_modules/graphql-request/dist/index.js:44:53)
at fulfilled (/Users/lmy/Documents/Projects/BrightOcean/u-social/node_modules/graphql-request/dist/index.js:35:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
response: {
data: null,
errors: [ [Object] ],
status: 200,
headers: Headers { [Symbol(map)]: [Object: null prototype] }
},
request: {
query: '\n' +
'query AutocompleteSearchQuery(\n' +
' $query: String!\n' +
')\n' +
'{\n' +
' autocomplete(query: $query) {\n' +
' schools {\n' +
' edges {\n' +
' node {\n' +
' id\n' +
' name\n' +
' city\n' +
' state\n' +
' }\n' +
' }\n' +
' }\n' +
' }\n' +
'}',
variables: { query: 'michigan technological university' }
}
}

@codetheweb
Copy link
Member

I noticed this was failing for michigantechcourses.com as well, happy to accept a PR for a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants