使用Graphql查询时,出现以下查询。
{
"data":{
"type":"FeatureCollection",
"features":[
{
"type":"Feature",
"geometry":{
"type":"Point",
"coordinates":[
38.544907,
-121.740517
],
"__typename":"GeometryType"
},
"__typename":"MapInfoType"
}
]
},
"type":"geojson"
}
GraphQL中是否可以直接不使用外部函数来排除所有元信息?
我想直接从GraphQL获得什么:
{
"data":{
"type":"FeatureCollection",
"features":[
{
"type":"Feature",
"geometry":{
"type":"Point",
"coordinates":[
38.544907,
-121.740517
],
},
}
]
},
"type":"geojson"
}
和查询
从“ graphql-tag”导入gql;
export default gql`
{
geoSites {
mapInfo {
type
geometry {
type
coordinates
}
}
}
}
`;