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

Imperative Cache API #748

Merged
merged 72 commits into from
Dec 17, 2022
Merged

Imperative Cache API #748

merged 72 commits into from
Dec 17, 2022

Conversation

AlecAivazis
Copy link
Collaborator

@AlecAivazis AlecAivazis commented Dec 7, 2022

closes #58, closes #61

This PR will track the progress of the first version of the imperative API. This release will not include the ability to mark data as stale or force queries to refresh. Those will come afterwards in order to keep the PRs as manageable as possible

  • Track schema information when writing selections (to marshal scalars using custom logic)
  • Confirm instability warning via config file
  • Get reference to root proxy
  • Get reference to record proxy
  • Get record value
  • Set field as scalar value
  • Get linked record
  • Set field as link
  • Accept schema metadata for type safety
  • Delete a record from the cache
  • list handlers
    • prepend
    • append
    • remove
    • when
  • arg typedef
  • complex keys
  • when typedef

@changeset-bot
Copy link

changeset-bot bot commented Dec 7, 2022

🦋 Changeset detected

Latest commit: 947e848

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
houdini Patch
houdini-react Patch
houdini-svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Dec 7, 2022

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

Name Status Preview Updated
docs ✅ Ready (Inspect) Visit Preview Dec 17, 2022 at 2:13AM (UTC)
docs-next ✅ Ready (Inspect) Visit Preview Dec 17, 2022 at 2:13AM (UTC)

@AlecAivazis AlecAivazis marked this pull request as draft December 7, 2022 08:18
@AlecAivazis AlecAivazis merged commit 78a18e8 into main Dec 17, 2022
@AlecAivazis AlecAivazis deleted the imperative-api branch December 17, 2022 23:58
@github-actions github-actions bot mentioned this pull request Dec 17, 2022
endigma pushed a commit to endigma/houdini that referenced this pull request Nov 10, 2024
* add schema manager

* add public wrapper with instability warning

* start on publicWrapper

* can read/write scalar values

* can retrieve linked records

* can set linked records

* fix schema manager test

* validate idFields

* add schema manager

* add public wrapper with instability warning

* start on publicWrapper

* can read/write scalar values

* can retrieve linked records

* can set linked records

* fix schema manager test

* validate idFields

* accomodate new selection structure

* updated public api to new selection structure

* imperative api data is garbage collected like normal

* add back instability acknowlgement

* rename test file

* changeset

* cache proxy can take a type definition for the schema

* fix tests

* embed args in cache description

* use correct type for args

* split pubic api into multiple files

* remove unused file

* clean up types

* typedefs for lists and abstract types

* tests for writing lists and unions pass

* unused imports

* fix comments

* remove Proxy from names

* add public List

* add when to list api

* add  remove to list

* remove placeholder tests

* add list.toggle

* add method to delete record

* strengthen test

* first pass at generating type defs

* better nullability behavior

* more better null handling

* fake tests

* use enum types

* unused import

* rename listwhen to filters

* start on args

* arg definitions can reference input types

* support scalar lists

* generated cache typedefitions use Records directly

* fix typedefs

* start on keys

* add another todo test

* compute complex keys

* better test for complex keys

* fix invalid imports

* can write and retrieve nested nullable lists

* test for embedded data

* generate list filters

* import Record from correct file

* avoid duplicate processing of lists

* fix nullability of fields args

* comment

* list act as proxies, not wrappers

* iterating over an empty list behaves correctly

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

Successfully merging this pull request may close these issues.

Generate types for connection handlers Imperative cache API
2 participants