如何进行不区分大小写的graphql查询? [英] how to make a case-insensitive graphql query?

查看:69
本文介绍了如何进行不区分大小写的graphql查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用GraphQL来获取和解析配置文件,有时文件名是 podfile ,有时是 Podfile ,所以我想知道如何进行不区分大小写的查询?

Using GraphQL to fetch and parse a config file, sometimes the file name be podfile, sometimes be Podfile, so I am wondering how to make a case-insensitive query?

现在我只能查询存储库->对象:podfile和Podfile,但是如果文件名是 podFILE ,则再次无效.

now I only can query repository->object: podfile and Podfile, but if the file name be podFILE, again not works.

query($org_name: String!, $resp_name: String!)
                {
                repository(owner: $org_name name: $resp_name){
                          object: object(expression: "%s:proj.ios_mac/podfile"){
                                                              ... on Blob{
                                                                          text
                                                                          }
                                                              }
                          ios_object_1: object(expression: "%s:proj.ios_mac/Podfile"){
                                                              ... on Blob{
                                                                          text
                                                                          }
                                                              }
                          }
                }

REF: https://github.community/t5/How-to-use-Git-and-GitHub/graphql-api-resource-query-is-case-sensitive/mp/6003

推荐答案

根据规范.名称包括字段名称,类型名称,变量名称等.

Names in GraphQL are case-sensitive, as per the spec. Names include field names, type names, variable names etc.

因此,简而言之,这是不可能的.

So, in short it is not possible to do it.

这篇关于如何进行不区分大小写的graphql查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆