-
Notifications
You must be signed in to change notification settings - Fork 17
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
Generate schema for isograph.config.json
#290
Generate schema for isograph.config.json
#290
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, yes, yes. Love it. 1000%. Let's rebase on main and I'll re-review
"schema" | ||
], | ||
"properties": { | ||
"$schema": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol is this a typo or is schema a special field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is intentional
@@ -95,7 +101,7 @@ struct ConfigFile { | |||
pub schema_extensions: Vec<PathBuf>, | |||
|
|||
/// Various that are of lesser importance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Various options of less importance
@@ -75,7 +75,7 @@ fn format_server_field_type( | |||
fn format_field_definition( | |||
schema: &ValidatedSchema, | |||
name: &SelectableFieldName, | |||
type_: &FieldType<ServerFieldId, ClientType<ClientFieldId>>, | |||
type_: &FieldType<ServerFieldId, ClientType<ClientFieldId, ClientPointerId>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I meant to rebase just the commits that relate to generating the schema, i.e. we shouldn't have any changes related to ☝️
What - Fixes the vite-demo tsc command How - Added the -b flag. The tsc error was about an output file not matching an input file, so by building, we ensure everything is generated so the error doesn't pop up again. I don't pretend to entirely understand exactly why, but it does work and will check types on the demo!
- document `useImperativeReference` and mutations - modify the pet demo to show the result of a mutation
Both are called with no parameters. Update docs accordingly.
# fix: Add noUncheckedIndexAccess to tsconfig ## What - Adds the `noUncheckedIndexAccess` option to the base `tsconfig.json` file - Fixes the errors that appeared - Resolves isographlabs#213 ## How - Added line to the file - Fixed issues primarily by throwing errors, as each area of the code expects it to exist and something is very wrong if it doesn't - Loosened equality checks in some places so all falsey values are caught - Changed a few `null`s to `undefined`s because accessing an index that doesn't exist (or accessing an array with `undefined` as an index value returns `undefined`)
- in makeNetworkRequest, if we pass an onComplete, we read out the result (after normalizing the data.) This gets passed to the resolver (for eager resolvers) or to getOrCreateCachedComponent (for @component resolvers). That value gets passed to onComplete - FetchOptions, as a result, must be generic, and that must be threaded through everywhere Further improvements: - makeNetworkRequest and read are doing some pretty redundant work... those should be combined - if reading the read-out value is expensive, then there should be two onComplete's: onCompleteWithReadOutValue and onComplete. However, this can be added later (if necessary)
…ph into generate-json-schema
No description provided.