-
Notifications
You must be signed in to change notification settings - Fork 194
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: rename schema to valueSchema #1482
Conversation
🦋 Changeset detectedLatest commit: 449bde4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 packages
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 |
b479643
to
f29829c
Compare
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
9348d50
to
26df50f
Compare
4189c86
to
14582af
Compare
@@ -127,7 +127,6 @@ The client package will vary depending on which template used (vanilla, react, p | |||
|
|||
- You can adjust `createClientComponents.ts` to either override contract components or add client-only components. | |||
- If you are using chains other than foundry/anvil and lattice testnet, you can add them in `getNetworkConfig.ts` | |||
- `createSystemCalls` represents how the client talks to the system contracts via our `worldSend` helper |
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.
fwiw we still have and use createSystemCalls
, we just go through worldContract.write
instead
@@ -45,7 +45,7 @@ For the sake of simplicity, we will implement this in the `increment` function r | |||
A MUD table has two schemas: | |||
|
|||
- `keySchema`, the key used to find entries | |||
- `schema`, the value in the entry (soon to be renamed to `valueSchema`) | |||
- `valueSchema`, the value in the entry |
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.
🎉
keySchema?: Record<string, KeySchema<StaticUserTypes>>; | ||
/** Table's column names mapped to their types. Table name's 1st letter should be lowercase. */ | ||
schema: SchemaConfig<UserTypes>; | ||
/** Table's field names mapped to their types. Table name's 1st letter should be lowercase. */ |
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.
the second sentence here is weird, should this be "field name's first letter"?
// to store, while `getField` loads it from storage. Remove this once we have support for passing the | ||
// schema in `getField` too. (See https://github.com/latticexyz/mud/issues/444) | ||
// valueSchema in `getField` too. (See https://github.com/latticexyz/mud/issues/444) |
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.
I think getField
now supports passing in value schema (or field layout now) so is this comment/workaround still relevant?
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.
true, will remove this in a followup
Fixes #1129