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

feat(sdk): single and collection query functions #10

Merged
merged 22 commits into from
Dec 16, 2024

Conversation

jhoward1994
Copy link
Contributor

What does it do?

Implemented CRUD query functions for single and collection types

Why is it needed?

Improved developer experience and usefulness of the SDK

How to test it?

Added unit tests
Initialise the SDK and perform CRUD operations on content

Related issue(s)/PR(s)

https://strapi-inc.atlassian.net/browse/DX-1776
https://strapi-inc.atlassian.net/browse/DX-1799

@jhoward1994 jhoward1994 self-assigned this Dec 12, 2024
@jhoward1994 jhoward1994 added the pr: feature New or updates to features label Dec 12, 2024
rollup.config.mjs Outdated Show resolved Hide resolved
@jhoward1994 jhoward1994 requested a review from Convly December 12, 2024 11:36
src/sdk.ts Outdated Show resolved Hide resolved
src/validators/sdk.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/sdk.ts Outdated Show resolved Hide resolved
src/sdk.ts Outdated Show resolved Hide resolved
@Convly
Copy link
Member

Convly commented Dec 12, 2024

Random question for later, but I'm wondering if we might want to introduce shortcuts in the HTTP client for common methods (.get, .post, .put, .delete).

Might offer a better experience when writing/reading requests and is quite a low-cost addition. What do you think? 🤔

@innerdvations
Copy link
Contributor

Random question for later, but I'm wondering if we might want to introduce shortcuts in the HTTP client for common methods (.get, .post, .put, .delete).

Might offer a better experience when writing/reading requests and is quite a low-cost addition. What do you think? 🤔

Could be useful, but I would prefer to add that in January for v2, just to make sure we get everything done in time for v1

src/single-types/index.ts Outdated Show resolved Hide resolved
src/utilities/index.ts Outdated Show resolved Hide resolved
src/utilities/index.ts Outdated Show resolved Hide resolved
src/validators/sdk.ts Outdated Show resolved Hide resolved
src/validators/sdk.ts Outdated Show resolved Hide resolved
Copy link
Contributor Author

@jhoward1994 jhoward1994 left a comment

Choose a reason for hiding this comment

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

Thanks @Convly this looks really good! I can't approve as I'm the author but I would do 😄

https://pbs.twimg.com/media/D90nHuOXkAAGxtJ?format=jpg&name=medium

@Convly
Copy link
Member

Convly commented Dec 16, 2024

Thanks @Convly this looks really good! I can't approve as I'm the author but I would do 😄

pbs.twimg.com/media/D90nHuOXkAAGxtJ?format=jpg&name=medium

Haha, I'll wait for the tests to pass & merge

@Convly Convly requested a review from innerdvations December 16, 2024 15:18
@Convly
Copy link
Member

Convly commented Dec 16, 2024

Haha, I'll wait for the tests to pass & merge

nvmd, hey @innerdvations
image

Copy link
Contributor

@innerdvations innerdvations left a comment

Choose a reason for hiding this comment

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

LGTM!

@Convly Convly added the source: sdk Source is the main SDK object label Dec 16, 2024
@Convly Convly merged commit 5c6f23f into main Dec 16, 2024
8 checks passed
@Convly Convly deleted the feat/single-collection-queries branch December 16, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: feature New or updates to features source: sdk Source is the main SDK object
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants