chore: remove direct usage from graphql (#9316)
**What** Remove direct usage of graphql toold and instead consume it from utils to have a single entry point to graphql tooling
This commit is contained in:
committed by
GitHub
parent
f294c99c92
commit
fba78c0fb1
@@ -1,4 +1,3 @@
|
||||
import { makeExecutableSchema } from "@graphql-tools/schema"
|
||||
import { MedusaModule } from "@medusajs/framework/modules-sdk"
|
||||
import {
|
||||
IndexTypes,
|
||||
@@ -22,7 +21,7 @@ export const CustomDirectives = {
|
||||
export function makeSchemaExecutable(inputSchema: string) {
|
||||
const { schema: cleanedSchema } = GraphQLUtils.cleanGraphQLSchema(inputSchema)
|
||||
|
||||
return makeExecutableSchema({ typeDefs: cleanedSchema })
|
||||
return GraphQLUtils.makeExecutableSchema({ typeDefs: cleanedSchema })
|
||||
}
|
||||
|
||||
function extractNameFromAlias(
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { isObject, isString } from "@medusajs/framework/utils"
|
||||
import { isObject, isString, GraphQLUtils } from "@medusajs/utils"
|
||||
import { IndexTypes } from "@medusajs/framework/types"
|
||||
import { GraphQLList } from "graphql"
|
||||
import { Knex } from "knex"
|
||||
import { OrderBy, QueryFormat, QueryOptions, Select } from "@types"
|
||||
|
||||
@@ -62,7 +61,7 @@ export class QueryBuilder {
|
||||
let currentType = fieldRef.type
|
||||
let isArray = false
|
||||
while (currentType.ofType) {
|
||||
if (currentType instanceof GraphQLList) {
|
||||
if (currentType instanceof GraphQLUtils.GraphQLList) {
|
||||
isArray = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user