如何在Atlas App Services Servema中为连字符字段编写解析器?
我有一个在MongoDB Atlas上运行的应用程序服务,我想知道如何使用自定义解析器摆脱连字段,因为我无法在GraphQl中查询它,因为它会导致语法错误。
我在下面发现了一个类似的问题,但是我想知道如何在地图集中实现同等标准。
"stuff": {
"bsonType": "object",
"properties": {
"hyphenated-field-is-causing-problems": {
"bsonType": "object",
"properties": {
"data": {
"bsonType": "string"
}
}
}
}
I have an App Service running on MongoDB Atlas, I'd like to know how I can get rid of a hyphenated field using a custom resolver, as I can't query it in GraphQL since it causes a syntax error.
I found a similar problem linked below, but I'd like to know how to implement the equivalent in Atlas.
How to handle hyphens in GraphQL Schema definitions
"stuff": {
"bsonType": "object",
"properties": {
"hyphenated-field-is-causing-problems": {
"bsonType": "object",
"properties": {
"data": {
"bsonType": "string"
}
}
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回答了我自己的问题。事实证明,如果您省略了连字符,则可以使用相同。
Answered my own question. Turns out if you omit the hyphens, it works the same.