t3dotgg / 1app5stacks

Theo built the same app 5 times because he's dumb
MIT License
75 stars 25 forks source link

[Go/GraphQL/SPA Version] Fix null assertions #16

Open lautarodapin opened 18 hours ago

lautarodapin commented 18 hours ago

I saw some prs adding better dx to the react side moving the gql strings to its owns files, so no bothering with that

17

vercel[bot] commented 18 hours ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
1app5stacks--go-graphql-spa-version ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 17, 2024 1:15am
vercel[bot] commented 18 hours ago

@lautarodapin is attempting to deploy a commit to the Theo's projects Team on Vercel.

A member of the Team first needs to authorize it.

Marcial1234 commented 16 hours ago

Frontend: We'd need to enforce fields asserts ([Foo!]!) on the GraphQL Schema for this to work, as that generates the TS types which then disable the need for asserts. On current schema everything is optional.

Backend: The changes do not follow the GraphQL principal that any fields can be requested/omitted at will (clients can request any subset of fields). For this change we'd need to change the schema first, and for that we'd need local access to it - which is proposed here :) - so overall that PR would need to go in first, and then we'd change the asserts.

This PR also changes a lot of styling & HTML-attribute ordering likely due to different formatters (i.e. not running the local prettier config), which are usually beyond the best practice of "minimal, necessary changes". I'd suggest reverting those changes, as all JSX files have them.

(perdon por la falta de español aqui, pero creo que se entiende bien aunque medio abstracto)