Revert "bump graphql to latest 15.x"

This reverts commit 7ce38a72f7.

Reason for revert: broke graphiql page

Change-Id: I9557bca47348c60abdf00e8796e8ef259e3e6b43
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345393
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
This commit is contained in:
Aaron Ogata 2024-04-16 16:53:32 +00:00
parent 97234c71ed
commit 993e2e685e
4 changed files with 14 additions and 11 deletions

View File

@ -6,7 +6,7 @@ namespace :graphql do
Rails.root.join("schema.graphql").open("w") do |f|
# The front-end library in use doesn't support @specifiedBy until v15.1.0 - remove it for now
# and match the behaviour of the previous schema dump
f.puts CanvasSchema.to_definition
f.puts CanvasSchema.to_definition.gsub(/@specifiedBy.*/, "")
end
Rails.root.join("ui/shared/apollo/fragmentTypes.json").open("w") do |f|

View File

@ -146,7 +146,7 @@
"fullcalendar": "3.10.5",
"graphiql": "^0.14.2",
"graphiql-explorer": "^0.4.2",
"graphql": "^15",
"graphql": "^14",
"graphql-request": "^6.1.0",
"graphql-tag": "^2.8.0",
"i18n-js": "^3",

View File

@ -16,7 +16,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import {validate, specifiedRules, coerceInputValue, GraphQLError} from 'graphql'
import {validate, specifiedRules, coerceValue, GraphQLError} from 'graphql'
export function validateGraphQLOperation(schema, query, variables = {}, extraRules = []) {
const validationRules = [
@ -55,11 +55,12 @@ function ValidateVariableValueMatchesType(variables = {}) {
const variableName = node.variable.name.value
const variableValue = variables[variableName]
const variableType = context.getInputType()
coerceInputValue(variableValue, variableType, (path, invalidValue, error) => {
const {errors = []} = coerceValue(variableValue, variableType)
errors.forEach(err =>
context.reportError(
new GraphQLError(`Unable to coerce variable: "${variableName}": ${error}`)
new GraphQLError(`Unable to coerce variable: "${variableName}": ${err}`)
)
})
)
},
})
}

View File

@ -14290,10 +14290,12 @@ graphql-tools@^4:
iterall "^1.1.3"
uuid "^3.1.0"
graphql@^15:
version "15.8.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.8.0.tgz#33410e96b012fa3bdb1091cc99a94769db212b38"
integrity sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==
graphql@^14:
version "14.7.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.7.0.tgz#7fa79a80a69be4a31c27dda824dc04dac2035a72"
integrity sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==
dependencies:
iterall "^1.2.2"
graphql@^16.8.1:
version "16.8.1"
@ -16231,7 +16233,7 @@ istanbul-reports@^3.0.2, istanbul-reports@^3.1.3, istanbul-reports@^3.1.6:
html-escaper "^2.0.0"
istanbul-lib-report "^3.0.0"
iterall@^1.1.3:
iterall@^1.1.3, iterall@^1.2.2:
version "1.3.0"
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea"
integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==