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
feat(graphql): generate types from graphql files #2014
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Deploying with Cloudflare Pages
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2014 +/- ##
==========================================
- Coverage 74.11% 74.11% -0.01%
==========================================
Files 297 301 +4
Lines 5958 6011 +53
Branches 1064 1075 +11
==========================================
+ Hits 4416 4455 +39
- Misses 1337 1346 +9
- Partials 205 210 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
affine-toeverythingBundle maindiff ------------------- Bundle Size Diff -------------------------
@@ EntryPoint: main @@
## master gql-gen +/- ##
===================================================================
< Bundle 4.27 MB 4.28 MB +10.5 kB(+0.25%)
< Initial JS 1.75 MB 1.75 MB +979 B(+0.06%)
= Initial CSS 13.2 kB 13.2 kB
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
= Assets 43 43
= Chunks 41 41
= Packages 150 150
= Duplicates 5 5
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Warnings ~~~~~~~~~~~~~~~~~~~~~~~~~~~#
! Deduplicate versions of libraries
! Separate mixed content assets files
! Avoid non-minified assets
! Avoid cache wasting
@@ EntryPoint: pages/_app @@
## master gql-gen +/- ##
===================================================================
< Bundle 4.16 MB 4.17 MB +10.5 kB(+0.25%)
< Initial JS 1.65 MB 1.65 MB +979 B(+0.06%)
= Initial CSS 13.2 kB 13.2 kB
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
= Assets 41 41
= Chunks 39 39
= Packages 150 150
= Duplicates 5 5
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Warnings ~~~~~~~~~~~~~~~~~~~~~~~~~~~#
! Deduplicate versions of libraries
! Separate mixed content assets files
! Avoid non-minified assets
! Avoid cache wasting
@@ EntryPoint: pages/_error @@
## master gql-gen +/- ##
===================================================================
= Bundle 16.7 kB 16.7 kB
= Initial JS 16.7 kB 16.7 kB
= Initial CSS 0 B 0 B
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
= Assets 2 2
= Chunks 2 2
= Packages 5 5
= Duplicates 0 0
...and more |
Initialize the
@affine/graphql
package, you can runyarn workspace @affie/graphql gql-gen
to generatesrc/graphql/index.ts
andsrc/schema.ts
files.The
src/graphql/index.ts
is generated bypackages/graphql-client/export-gql-plugin.cjs
;A SWR request wrapper has been written and placed in
app/web/shared/gql.ts
Queries:
Mutations: