graphql-tag.macro 库的Babel Macro。 它能做什么 它内联使用graphql-tag解析GraphQL查询的结果。 转换为: const query = gql ` query { hello { world } } ` ; 对此: const query = { 'kind' : 'Document' , 'definitions' : [ { 'kind' : 'OperationDefinition' , 'operation' : 'query' , 'variableDefinitions' : [ ] , 'directives' : [ ] , 'selectionSet' : { 'kind' : 'SelectionSet' , 'selections' : [ { 'kind' : 'Field' , 'alias' : null , 'name' : {
2021-02-01 14:37:48 168KB graphql babel graphql-tag babel-macros
1