graphql-compose / graphql-compose/graphql-compose-elasticsearch

Error: cannot represent value: ["open", "closed"]

Open
#115 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
584
Forks
76
PR merge metrics
No merged PRs in 30d

Description

Hi, guys!
I've been trying to use this module in a project of mine that runs a express server, but for some reason the following error message always comes up:

```
GraphQLError [Object]: Enum "ElasticAPI72Enum_ExpandWildcards" cannot represent value: ["open", "closed"]
```
My code is practically the same as the one in the [example](https://github.com/graphql-compose/graphql-compose-elasticsearch/blob/master/examples/differentVersions/index.js).
I've already tried to downgrade (until the 5.8 version) and even upgrade the elasticsearch version but the message always shows up.
I'm using the 7.2 elasticsearch docker image (along with other images/containers with docker-compose).

Dependencies (related to the module) in the package.json:
"elasticsearch": "^16.0.0",
"graphql-compose": "^7.0.4",
"graphql-compose-elasticsearch": "^4.0.10"

The stacktrace:
```sh
/node_modules/graphql/type/definition.js:999
throw new _GraphQLError.GraphQLError("Enum \"".concat(this.name, "\" cannot represent value: ").concat((0, _inspect.default)(outputValue)));
^

GraphQLError [Object]: Enum "ElasticAPI72Enum_ExpandWildcards" cannot represent value: ["open", "closed"]
at GraphQLEnumType.serialize (/node_modules/graphql/type/definition.js:999:13)
at astFromValue (/node_modules/graphql/utilities/astFromValue.js:136:27)
at /node_modules/graphql-compose/lib/utils/definitionNode.js:307:80
at Array.map ()
at getArgumentsDefinitionNodes (/node_modules/graphql-compose/lib/utils/definitionNode.js:294:19)
at /node_modules/graphql-compose/lib/utils/definitionNode.js:326:18
at Array.map ()
at getFieldDefinitionNodes (/node_modules/graphql-compose/lib/utils/definitionNode.js:315:21)
at getObjectTypeDefinitionNode (/node_modules/graphql-compose/lib/utils/definitionNode.js:40:13)
at ObjectTypeComposer.getType (/node_modules/graphql-compose/lib/ObjectTypeComposer.js:700:76)
```

Do you guys have any idea how to solve this issue?

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.