Shallow?
azat-co opened this issue · 6 comments
Is this a shallow converter? I'm always getting JSON on nested types. It'll be nice to add some if/else in recursion to make this library to go deep.
Its strange.
Should also create sub types.
See this lines
graphql-compose-json/src/ObjectParser.js
Line 43 in 8947d87
Can you provide a test case? Or even make PR (хватит книжки писать - сделай ПР, почему на holyjs не был)?
Right now I'm in Moscow. Will be at home via several days. But your changes may publish from mobile phone. 🤘
PS. Also you may see my 300 slides for HolyJS and GraphQL Moscow Meetup https://github.com/nodkz/conf-talks/tree/master/holyjs-2018
Как ты смотришь на написание книжки по GraphQL в соавторстве?
https://github.com/nodkz/conf-talks/tree/master/articles/graphql
@azat-co just added a test case for checking nested objects. And it properly creates Type for nested object.
graphql-compose-json/src/__tests__/composeWithJson-test.js
Lines 156 to 171 in 041e4ef
Maybe you have another case which does not work for you?
У меня был JSON for nested types. Я могу посмотреть и про тестировать еще
По моему это возникало на 2 или 3 уровне вложенности
Еще не могу сделать строку из типа
const composeWithJson = require('graphql-compose-json').default;
const { print } = require('graphql/language/printer');
const {parse} = require('graphql');
const restApiResponse = require('./JobSearchResponseIndexResultsPage.gql')
const JobSearchResponse = composeWithJson('JobSearchResponse', restApiResponse);
const JobSearchResponseGQLType = JobSearchResponse.getType();
// console.log(print(parse(JobSearchResponse)));
Был где-то код но сейчас не могу найти. Это как?
🎉 This issue has been resolved in version 4.1.0 🎉
The release is available on:
Your semantic-release bot 📦🚀