Я новичок в graphQL и mongoDB и пытаюсь заставить его работать в моем проекте.Проблема в данных из запроса, которые в GraphiQL полностью отличаются от данных из того же запроса на моей стороне клиента.Вот мои настройки схемы:
const graphql = require('graphql');
const _ = require('lodash');
const Item = require('../models/item');
const {
GraphQLObjectType,
GraphQLString,
GraphQLSchema,
GraphQLID,
GraphQLInt,
GraphQLList
} = graphql;
const ItemType = new GraphQLObjectType({
name: 'Item',
fields: () => ({
name: {
type: GraphQLString
},
id: {
type: GraphQLID
},
description: {
type: GraphQLString
},
price: {
type: GraphQLInt
},
image: {
type: GraphQLString
},
category: {
type: GraphQLString
}
})
});
const RootQuery = new GraphQLObjectType({
name: 'RootQueryType',
fields: {
item: {
type: ItemType,
args: {
id: {
type: GraphQLID
}
},
resolve(parent, args) {
// code to get data from db / other source
return Item.findById(args.id);
}
},
items: {
type: new GraphQLList(ItemType),
resolve(parent, args) {
return Item.find({})
}
}
}
});
Когда я делаю запрос из graphiQL обо всех итерациях и данных, которые я получаю, это «правильный».Это выглядит так: 
Когда я делаю тот же самый точный запрос из внешнего интерфейса, вот так: import {gql} from "apollo-boost";
const getItemsQuery = gql`
{
items {
name
id
description
price
image
category
}
}
`;
export { getItemsQuery };
Данные выглядят так: 
Похоже, это повторяет первый пункт снова и снова, и я не понимаю, почему.БД также показывает нужные элементы.Код моего сервера можно найти здесь: https://github.com/KamilStaszewski/shoppy/tree/adding_graphQL/server 