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

chore: Update table path param to be a query param #1798

Closed
wants to merge 17 commits into from

Conversation

KyleAMathews
Copy link
Contributor

Partially addresses #1771

Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for electric-next ready!

Name Link
🔨 Latest commit 78df825
🔍 Latest deploy log https://app.netlify.com/sites/electric-next/deploys/6728d81e6d955f0008859cfa
😎 Deploy Preview https://deploy-preview-1798--electric-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@KyleAMathews KyleAMathews marked this pull request as draft October 6, 2024 20:53
@KyleAMathews KyleAMathews marked this pull request as ready for review October 10, 2024 12:07
@msfstef msfstef self-requested a review October 23, 2024 08:31
Copy link
Contributor

@msfstef msfstef left a comment

Choose a reason for hiding this comment

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

Looks good!

@KyleAMathews I've fixed up all the elixir, integration, and TS tests and any type issues in the examples - I haven't run all the examples to make sure they work though.

I've also updated the OpenAPI spec and some docs to reflect the API change and added "breaking" changesets.

I've noticed that we're using "root table" as a term in some places in the docs with respect to the API, and although the term makes sense for the shape definition I'm worried about it becoming confusing. I've made it so that 400 errors return with "table": ["table not found"] rather than "root_table" cause I feel that 400s should return errors matching the problematic parameters, but just noting this occasional discrepancy.

@KyleAMathews
Copy link
Contributor Author

Great thanks! I'll give this a through go over later & double-check docs, examples, etc. and then merge it in

@KyleAMathews
Copy link
Contributor Author

Yeah root_table is useful in Elixir to be really clear about what table it is but since only one table is allowed in a shape request, just calling it "table" everywhere else is cleaner.

@KyleAMathews
Copy link
Contributor Author

Ok, this is ready to go — all examples are tested & gave another look over docs.

Per #1796 (review) we'll just either need to decide on the order of merging.

@KyleAMathews
Copy link
Contributor Author

Not sure where those typescript errors are from — not reproducing locally.

@thruflo
Copy link
Contributor

thruflo commented Oct 24, 2024

So everywhere we have table in the URL we need to switch to table as a param? Can you shout when this is merged so we can update parallel PRs like deployment docs and Elixir client.

@KyleAMathews
Copy link
Contributor Author

The docs are already updated as part of this PR — we can just release it right away when we merge.

@msfstef
Copy link
Contributor

msfstef commented Nov 4, 2024

@KyleAMathews no need to rebase this as @thruflo has combined all these changes to #1900

icehaunter added a commit that referenced this pull request Nov 5, 2024
…params (#1900)

Included renames:
- `electric-chunk-last-offset` -> `electric-offset`
- `electric-next-cursor` -> `electric-cursor`
- `electric-shape-id` -> `electric-handle`
- `?shape_id` -> `?handle`

Added query parameter: `?table` instead of `/:table` in the path

Closes #1771, #1796, #1798

---------

Co-authored-by: Kyle Mathews <[email protected]>
Co-authored-by: msfstef <[email protected]>
Co-authored-by: Ilia Borovitinov <[email protected]>
@icehaunter
Copy link
Contributor

Superseded by #1900

@icehaunter icehaunter closed this Nov 5, 2024
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.

4 participants