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

Setup relations for remote objects #5149

Merged
merged 10 commits into from
Apr 26, 2024
Merged

Setup relations for remote objects #5149

merged 10 commits into from
Apr 26, 2024

Conversation

thomtrp
Copy link
Contributor

@thomtrp thomtrp commented Apr 24, 2024

New strategy:

  • add settings field on FieldMetadata. Contains a boolean isIdField and for numbers, a precision
  • if idField, the graphql scalar returned will be a GraphQL id. This will allow the app to work even for ids that are not uuid
  • remove globals dateScalar and numberScalar modes. These were not used
  • set limit as Integer
  • check manually in query runner mutations that we send a valid id

Todo left:

  • remove WorkspaceBuildSchemaOptions since this is not used anymore. Will do in another PR

Copy link

github-actions bot commented Apr 24, 2024

TODOs/FIXMEs:

  • // TODO: function should work for other types than Postgres: packages/twenty-server/src/engine/metadata-modules/remote-server/remote-table/remote-table.service.ts
  • // TODO: function should work for other types than Postgres: packages/twenty-server/src/engine/metadata-modules/remote-server/remote-table/remote-table.service.ts

Generated by 🚫 dangerJS against ae0f24f

Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

  • Can be done in an upcoming PR but since we don't want to allow field creation for remote objects can we hide the "add field" in the settings?

Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

I couldn't make it work with integer primary keys

@thomtrp thomtrp force-pushed the tt-setup-numbers-as-integer branch 3 times, most recently from 1f61472 to da1b518 Compare April 25, 2024 15:25
@thomtrp thomtrp force-pushed the tt-setup-numbers-as-integer branch from da1b518 to aa3b1c4 Compare April 25, 2024 15:58
Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

I have typecheck errors such as inside FieldMetadataItem.ts not returning isRemote

@thomtrp thomtrp force-pushed the tt-setup-numbers-as-integer branch from 67d89c2 to b325535 Compare April 26, 2024 09:54
@thomtrp thomtrp force-pushed the tt-setup-numbers-as-integer branch from 17961d6 to a455e03 Compare April 26, 2024 10:16
@Weiko Weiko enabled auto-merge (squash) April 26, 2024 12:36
@Weiko Weiko disabled auto-merge April 26, 2024 12:37
Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

LGTM! 👏 @thomtrp

@Weiko Weiko merged commit 224c8d3 into main Apr 26, 2024
9 of 10 checks passed
@Weiko Weiko deleted the tt-setup-numbers-as-integer branch April 26, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants