graphql-compose / graphql-compose/graphql-compose-elasticsearch
Mappings with hyphens can't be parsed
- Dominant language
- TypeScript
- Stars
- 584
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
If the ES mapping property name contains a hyphen, the service cannot start. Is there a workaround?
```
"comment-author-type": {
type: "text",
fields: {
keyword: {
type: "keyword",
ignore_above: 256
}
}
},
```
```
"errors": [
{
"message": "Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"comment-author-type\" does not.",
"stack": [
"GraphQLError: Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"comment-author-type\" does not.",
" at isValidNameError (/Users/clint/Projects/chirp/node_modules/graphql/utilities/assertValidName.js:42:12)",
" at validateName (/Users/clint/Projects/chirp/node_modules/graphql/type/validate.js:199:53)",
" at validateInputFields (/Users/clint/Projects/chirp/node_modules/graphql/type/validate.js:439:5)",
" at validateTypes (/Users/clint/Projects/chirp/node_modules/graphql/type/validate.js:240:7)",
" at validateSchema (/Users/clint/Projects/chirp/node_modules/graphql/type/validate.js:54:3)",
" at /Users/clint/Projects/chirp/node_modules/express-graphql/index.js:97:66",
" at processTicksAndRejections (internal/process/task_queues.js:93:5)"
]
},
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.