Forum plugin grapgql schema validation error
jrrcdev opened this issue · comments
Jonatan commented
Describe the bug
I'm trying to run the forum plugin with the configs bellow from branch dev:
"plugins": [
{
"name":"imap",
"ui": "local"
},
{
"name":"forum",
"ui": "local"
},
{
"name":"contacts",
"ui":"local"
},
{
"name": "inbox",
"ui": "local"
},
{
"name":"integrations"
},
{
"name":"logs"
}
]
I'm getting this error:
{
"graphQLErrors": [],
"networkError": {
"name": "ServerError",
"response": {},
"statusCode": 400,
"result": {
"errors": [
{
"message": "Unknown type \"ID\".",
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception": {
"stacktrace": [
"GraphQLError: Unknown type \"ID\"."
]
}
}
},
{
"message": "Unknown type \"ID\".",
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception": {
"stacktrace": [
"GraphQLError: Unknown type \"ID\"."
]
}
}
},
{
"message": "Unknown type \"ForumPostState\".",
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception": {
"stacktrace": [
"GraphQLError: Unknown type \"ForumPostState\"."
]
}
}
},
{
"message": "Unknown type \"AdminApprovalState\".",
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception": {
"stacktrace": [
"GraphQLError: Unknown type \"AdminApprovalState\"."
]
}
}
},
{
"message": "Cannot query field \"forumPosts\" on type \"Query\".",
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception": {
"stacktrace": [
"GraphQLError: Cannot query field \"forumPosts\" on type \"Query\"."
]
}
}
}
]
}
},
"message": "Network error: Response not successful: Received status code 400"
}
Is this a bug or missing some config?
Dulguun Otgon commented
Try stopping and running everything again. This seems to happen on the first run. We haven't found out exactly why, yet.
Jonatan commented
Now when I try to run the forum-api, I'm getting this error:
/home/jonatan/dev/repos/erxes-community/node_modules/graphql/utilities/extendSchema.js:360
throw new Error("Unknown type: \"".concat(name, "\"."));
^
Error: Unknown type: "Tag".
at getNamedType (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/utilities/extendSchema.js:360:13)
at getWrappedType (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/utilities/extendSchema.js:375:12)
at getWrappedType (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/utilities/extendSchema.js:368:42)
at buildFieldMap (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/utilities/extendSchema.js:409:17)
at fields (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/utilities/extendSchema.js:561:22)
at resolveThunk (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/type/definition.js:480:40)
at defineFieldMap (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/type/definition.js:692:18)
at GraphQLObjectType.getFields (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/type/definition.js:633:27)
at collectReferencedTypes (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/type/schema.js:366:81)
at new GraphQLSchema (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/type/schema.js:148:9)
at Object.extendSchema (/home/jonatan/dev/repos/erxes-community/node_modules/graphql/utilities/extendSchema.js:82:53)
at buildSchemaFromSDL (/home/jonatan/dev/repos/erxes-community/node_modules/apollo-graphql/src/schema/buildSchemaFromSDL.ts:165:12)
at buildSubgraphSchema (/home/jonatan/dev/repos/erxes-community/node_modules/@apollo/subgraph/src/buildSubgraphSchema.ts:65:34)
at /home/jonatan/dev/repos/erxes-community/packages/plugin-forum-api/.erxes/src/index.ts:167:32
at Generator.next (<anonymous>)
at fulfilled (/home/jonatan/dev/repos/erxes-community/packages/plugin-forum-api/.erxes/src/index.ts:5:58)