Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Генерация типов apollo #67

Closed
fenok opened this issue Nov 7, 2018 · 1 comment
Closed

Генерация типов apollo #67

fenok opened this issue Nov 7, 2018 · 1 comment

Comments

@fenok
Copy link
Contributor

fenok commented Nov 7, 2018

Добавить --passthroughCustomScalars --customScalarsPrefix=GQL_ при генерации типов Apollo, а также graphql-custom-scalars.d.ts в @types. Это нужно для нормальной типизации кастомных скалярных типов, например Email, PositiveInteger, Timestamp и т.д. (иначе они будут any).

Вынести генерацию типов в отдельный файл, по аналогии со схемой и конфигом. Так аккуратнее и не ломается на древней версии yarn (для которой надо добавлять -- перед аргументами).

Удалять старые типы перед генерацией новых

@fenok fenok changed the title Добавить --passthroughCustomScalars --customScalarsPrefix=GQL_ при генерации типов Apollo Генерация типов apollo Nov 9, 2018
@fenok
Copy link
Contributor Author

fenok commented Nov 27, 2018

Нужно обновить генератор типов, но пока нельзя: apollographql/apollo-tooling#719

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant