-
Notifications
You must be signed in to change notification settings - Fork 30
fix error with hot module replacement #307
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
Closed
PatrykWalach
wants to merge
61
commits into
isographlabs:main
from
PatrykWalach:fix-use-effect-error-on-hmr-rebase
Closed
fix error with hot module replacement #307
PatrykWalach
wants to merge
61
commits into
isographlabs:main
from
PatrykWalach:fix-use-effect-error-on-hmr-rebase
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)
- We are not actively maintaining or working on the relay crates, so we're okay with suppressing things that aren't trivial fixes.
- do not use rust 1.75, since it is no longer supported (apparently!) - do not install rust in a step where it was unneeded
- generate a JSON schema for `isograph.config.json`, which users can then refer to via `"$schema": "path to schema"` for some added type safety
- write the JSON schema file directly from rust. Turns out using `stdout > file` results in different behavior in Windows and Linux, which this should fix
- Add a magic `link` field that can be selected on any item, whose type is `Link`
- This is analogous to Relay's `__id` field
- This field is used internally by e.g. `asUser`, whose resolver is implemented as `data.__typename === 'User' ? data.link : null`
- Within the runtime store APIs, a `Link` is the data structure that is used to navigate between two items. e.g. the store might contain `{ Query: { pets: [{ __link: '0', __typename: 'Pet' }] }`. `{ __link: '0', __typename: 'Pet' }` is a `Link`
This converts NormalizationAst from NormalizationAstNode[] to object with kind: "NormalizationAst" so we can make it a union of NormalizationAstLoader and NormalizationAst in isographlabs#271
… void (isographlabs#286) - add a no_babel_transform option to the config - if this is set to true, then iso literals for entrypoints have type void (even though they will actually be a x => x) - if this is set to true, then iso literals that are called (e.g. field definitions) will not throw an error - this gives a better overall experience to folks that cannot use the babel transform
…e this for fixtures
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rebase of #264