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

Handle 'data' wrapped responses for Create and Update #109

Merged
merged 2 commits into from
Oct 22, 2020
Merged

Handle 'data' wrapped responses for Create and Update #109

merged 2 commits into from
Oct 22, 2020

Conversation

fadugyamfi
Copy link
Contributor

Laravel allows data wrapping for all responses, so create and update requests should support this if it is done.

@codecov

This comment has been minimized.

@robsontenorio
Copy link
Owner

Thanks for PR. Could you please include tests?

@JoaoPedroAS51 JoaoPedroAS51 changed the base branch from master to dev October 22, 2020 01:10
@JoaoPedroAS51 JoaoPedroAS51 merged commit 1bc6248 into robsontenorio:dev Oct 22, 2020
JoaoPedroAS51 added a commit to JoaoPedroAS51/vue-api-query that referenced this pull request Oct 27, 2020
* docs: add nuxt docs

* docs: add introduction, installation, configuration, usage and nuxt example

* docs: add api docs

* docs: update configuration and usage

* ci: add nodejs ci

* ci: fix setup node version

* chore(eslint): add .eslintignore

* chore(scripts): add "lint" script

* chore(scripts): add "test-watch" script

* ci(docs): update deploy action

* ci: fix docs and publish

* ci: fix docs working directory

* docs: fix url

* docs: fix base url

* ci: fix docs action

* docs: fix pages position

* chore(script): add `--coverage` flag to `test` script

* ci(publish): add step to upload coverage to codecov

* chore(scripts): remove "prepare" script

* fix(model): add null check in `isValidId` (robsontenorio#115)

When an entity is being saved, nulls are considered as existing entities, so it tries to update and not insert.

* feat(model): handle 'data' wrapped responses for create and update (robsontenorio#109)

Laravel allows data wrapping for all responses, so create and update requests should support this if it is done.

* feat(model): add support to nested keys for relations (robsontenorio#127)

* feat(utils): add utilities `getProp` and `setProp`

* feat(model): add support to nested keys for relations

* test(model): test support of nested keys for relations

* test(utils): test utilities

* chore: update readme

* chore: bump node-fetch from 2.6.0 to 2.6.1 (robsontenorio#124)

Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](node-fetch/node-fetch@v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: update configuration and api options

* docs: update api docs

* docs(model options): update docs

* docs(query builder methods): update docs

* docs(model options): add `primaryKey` default value

* docs(model options): fix typo

* docs(example): rename file of nuxt example

* docs: remove usage section

* docs: add building query section

* docs: fix typo

* docs: add  "including relationships"

* docs: add helpers

* docs(operations): fix typo

* docs(api): update query builder methods

* docs: fix response of section "including relationships"

* docs: add "appending attributes"

* docs: add "selecting fields" and update other docs

* docs: add "paginating" and add missing colons.

* docs: add api reference to "selecting fields" section

* docs: update "paginating" section

* docs: add "applying parameters"

* docs: add "calling a custom resource"

* docs: add api reference of `params` and `custom`

* docs: add "composing without request"

* docs: remove unnecessary responses

* docs: update "calling a custom resource"

* docs: fix crud order

* docs: fix create request

* docs: update example of delete operation

* docs: add "mixing everything up"

* docs: fix append example

* docs: add "performing operations"

* docs: update `select` and `custom`

* docs: update model options

* docs: update configuration

* docs: add vue example

Co-authored-by: Guilherme Zanini <[email protected]>
Co-authored-by: Francis Adu-Gyamfi <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JoaoPedroAS51 added a commit to JoaoPedroAS51/vue-api-query that referenced this pull request Oct 27, 2020
* docs: add nuxt docs

* docs: add introduction, installation, configuration, usage and nuxt example

* docs: add api docs

* docs: update configuration and usage

* ci: add nodejs ci

* ci: fix setup node version

* chore(eslint): add .eslintignore

* chore(scripts): add "lint" script

* chore(scripts): add "test-watch" script

* ci(docs): update deploy action

* ci: fix docs and publish

* ci: fix docs working directory

* docs: fix url

* docs: fix base url

* ci: fix docs action

* docs: fix pages position

* chore(script): add `--coverage` flag to `test` script

* ci(publish): add step to upload coverage to codecov

* chore(scripts): remove "prepare" script

* fix(model): add null check in `isValidId` (robsontenorio#115)

When an entity is being saved, nulls are considered as existing entities, so it tries to update and not insert.

* feat(model): handle 'data' wrapped responses for create and update (robsontenorio#109)

Laravel allows data wrapping for all responses, so create and update requests should support this if it is done.

* feat(model): add support to nested keys for relations (robsontenorio#127)

* feat(utils): add utilities `getProp` and `setProp`

* feat(model): add support to nested keys for relations

* test(model): test support of nested keys for relations

* test(utils): test utilities

* chore: update readme

* chore: bump node-fetch from 2.6.0 to 2.6.1 (robsontenorio#124)

Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](node-fetch/node-fetch@v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: update configuration and api options

* docs: update api docs

* docs(model options): update docs

* docs(query builder methods): update docs

* docs(model options): add `primaryKey` default value

* docs(model options): fix typo

* docs(example): rename file of nuxt example

* docs: remove usage section

* docs: add building query section

* chore: update package.json

* chore: update README.md

* docs: fix typo

* docs: add  "including relationships"

* docs: add helpers

* docs(operations): fix typo

* docs(api): update query builder methods

* docs: fix response of section "including relationships"

* docs: add "appending attributes"

* docs: add "selecting fields" and update other docs

* fix(utils): accept array of strings in param `propName` of `setProp`

* test(utils): add tests for `setProp`

* fix(utils): fix `getProp`

* fix(utils): accept array of strings in param `propName` of `getProp`

* test(utils): add tests for `getProp`

* refactor(utils): update jsdocs of `getProp` and `setProp`

* refactor(test): remove semicolon

* docs: add "paginating" and add missing colons.

* docs: add api reference to "selecting fields" section

* docs: update "paginating" section

* docs: add "applying parameters"

* docs: add "calling a custom resource"

* docs: add api reference of `params` and `custom`

* docs: add "composing without request"

* docs: remove unnecessary responses

* docs: update "calling a custom resource"

* docs: fix crud order

* docs: fix create request

* docs: update example of delete operation

* docs: add "mixing everything up"

* docs: fix append example

* docs: add "performing operations"

* docs: update `select` and `custom`

* docs: update model options

* docs: update configuration

* docs: add vue example

* docs: update "needless parent request"
JoaoPedroAS51 added a commit to JoaoPedroAS51/vue-api-query that referenced this pull request Oct 27, 2020
* docs: add nuxt docs

* docs: add introduction, installation, configuration, usage and nuxt example

* docs: add api docs

* docs: update configuration and usage

* ci: add nodejs ci

* ci: fix setup node version

* chore(eslint): add .eslintignore

* chore(scripts): add "lint" script

* chore(scripts): add "test-watch" script

* ci(docs): update deploy action

* ci: fix docs and publish

* ci: fix docs working directory

* docs: fix url

* docs: fix base url

* ci: fix docs action

* docs: fix pages position

* chore(script): add `--coverage` flag to `test` script

* ci(publish): add step to upload coverage to codecov

* chore(scripts): remove "prepare" script

* fix(model): add null check in `isValidId` (robsontenorio#115)

When an entity is being saved, nulls are considered as existing entities, so it tries to update and not insert.

* feat(model): handle 'data' wrapped responses for create and update (robsontenorio#109)

Laravel allows data wrapping for all responses, so create and update requests should support this if it is done.

* feat(model): add support to nested keys for relations (robsontenorio#127)

* feat(utils): add utilities `getProp` and `setProp`

* feat(model): add support to nested keys for relations

* test(model): test support of nested keys for relations

* test(utils): test utilities

* chore: update readme

* chore: bump node-fetch from 2.6.0 to 2.6.1 (robsontenorio#124)

Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](node-fetch/node-fetch@v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: update configuration and api options

* docs: update api docs

* docs(model options): update docs

* docs(query builder methods): update docs

* docs(model options): add `primaryKey` default value

* docs(model options): fix typo

* docs(example): rename file of nuxt example

* docs: remove usage section

* docs: add building query section

* chore: update package.json

* chore: update README.md

* docs: fix typo

* docs: add  "including relationships"

* docs: add helpers

* docs(operations): fix typo

* docs(api): update query builder methods

* docs: fix response of section "including relationships"

* docs: add "appending attributes"

* docs: add "selecting fields" and update other docs

* fix(utils): accept array of strings in param `propName` of `setProp`

* test(utils): add tests for `setProp`

* fix(utils): fix `getProp`

* fix(utils): accept array of strings in param `propName` of `getProp`

* test(utils): add tests for `getProp`

* refactor(utils): update jsdocs of `getProp` and `setProp`

* refactor(test): remove semicolon

* docs: add "paginating" and add missing colons.

* docs: add api reference to "selecting fields" section

* docs: update "paginating" section

* docs: add "applying parameters"

* docs: add "calling a custom resource"

* docs: add api reference of `params` and `custom`

* docs: add "composing without request"

* docs: remove unnecessary responses

* docs: update "calling a custom resource"

* docs: fix crud order

* docs: fix create request

* docs: update example of delete operation

* docs: add "mixing everything up"

* docs: fix append example

* docs: add "performing operations"

* docs: update `select` and `custom`

* docs: update model options

* docs: update configuration

* docs: add vue example

* docs: update "needless parent request"

* docs: remove helpers
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.

3 participants