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

Merge configs #97

Open
innovate-invent opened this issue Jan 8, 2020 · 1 comment
Open

Merge configs #97

innovate-invent opened this issue Jan 8, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@innovate-invent
Copy link
Contributor

innovate-invent commented Jan 8, 2020

Currently object unpacking is being used to combine all of the configs. This does not allow setting axios settings higher up in the config stack that are objects.
For example, if I want a global param for all requests I would expect to be able to go:

VuexORM.use(VuexORMAxios, {
	params: {
		key: "foo"
	}
});

Currently any lower config specifying params will overwrite this.
Something along the lines of lodash merge should be used.
If I wanted to unset a setting higher up I can simply do something like:

Model.get('url', {
	params: {
		key: null
	}
});
innovate-invent pushed a commit to innovate-invent/plugin-axios that referenced this issue Jan 10, 2020
innovate-invent pushed a commit to innovate-invent/plugin-axios that referenced this issue Jan 10, 2020
innovate-invent pushed a commit to innovate-invent/plugin-axios that referenced this issue Jan 10, 2020
innovate-invent pushed a commit to innovate-invent/plugin-axios that referenced this issue Jan 10, 2020
innovate-invent pushed a commit to innovate-invent/plugin-axios that referenced this issue Jan 10, 2020
@kiaking kiaking added the enhancement New feature or request label Feb 26, 2020
@kiaking
Copy link
Member

kiaking commented Feb 26, 2020

Thanks! Yea good idea. And thanks for the PR too! I'll check the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants