Skip to content

Conversation

@PatrykWalach
Copy link
Member

@PatrykWalach PatrykWalach commented Nov 20, 2025

export type Query__subquery__rawResponse = {
query: {
node____id___v_id: {
__typename: "Node",
Copy link
Member Author

@PatrykWalach PatrykWalach Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs FIX

@PatrykWalach PatrykWalach force-pushed the p-branch-22 branch 3 times, most recently from 2c58992 to e5fe58e Compare November 20, 2025 21:01
Copy link
Collaborator

@rbalicki2 rbalicki2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hell yeah. I can't wait to have a normalizeData API that has types that we can sent to Randall 🤩

raw_response_type.push_str(&format!("{indent}}},\n"));
}
MergedServerSelection::ClientPointer(_) => {}
MergedServerSelection::InlineFragment(_) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be true for GraphQL in general, but we don't support anything besides abstract -> concrete type refinements via asConcreteType fields, so we can generate a discriminated union here.

@PatrykWalach PatrykWalach force-pushed the p-branch-22 branch 3 times, most recently from 01d1724 to 31c6598 Compare November 21, 2025 21:33
@PatrykWalach PatrykWalach force-pushed the p-branch-22 branch 2 times, most recently from 93b5711 to 565e98e Compare November 21, 2025 23:42
@PatrykWalach PatrykWalach force-pushed the p-branch-22 branch 5 times, most recently from 3ec0f4e to ec3d18b Compare November 23, 2025 15:08
Copy link
Collaborator

@rbalicki2 rbalicki2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! Only the plural thing seems like a blocker.

lastName: string,
picture: string,
},
picture_together?: (string | null),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. not a blocker if it's not trivial to fix, but
  2. we should confirm that if this isn't provided, we don't suspend. If we write store.picture_together = data.picture_together, we would write undefined, at which point this would cause us to suspend
export function readScalarFieldData(
  field: ReaderScalarField,
  storeRecord: StoreRecord,
  root: StoreLink,
  variables: Variables,
): ReadDataResult<
  string | number | boolean | StoreLink | DataTypeValue[] | null
> {
  const storeRecordName = getParentRecordKey(field, variables);
  const value = storeRecord[storeRecordName];
  // TODO consider making scalars into discriminated unions. This probably has
  // to happen for when we handle errors.
  if (value === undefined) {
    return {
      kind: 'MissingData',
      reason: 'No value for ' + storeRecordName + ' on root ' + root.__link,
      recordLink: root,
    };
  }
  return { kind: 'Success', data: value };
}
  1. if it does cause us to suspend, I will inform Jerred about this, and he can use Isograph with that issue until we fix it

node: {
id: string,
author: {
__typename: string,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 can we make this a union of concrete strings of types that implement Actor? Not a blocker

@@ -0,0 +1,10 @@
export type Query__HomeRoute__rawResponse = {
pets: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be an array

@PatrykWalach PatrykWalach force-pushed the p-branch-22 branch 2 times, most recently from c9f8b7a to e17885b Compare November 23, 2025 18:20
Copy link
Collaborator

@rbalicki2 rbalicki2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shipitttt

add __typename in `create_merged_selection_set` if selection is empty
foo
update demos
update demos
update demos
@rbalicki2 rbalicki2 merged commit b397289 into isographlabs:main Nov 23, 2025
20 checks passed
@rbalicki2 rbalicki2 deleted the p-branch-22 branch November 23, 2025 18:31
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.

2 participants