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

Rename ctorData to ctorConfig #37

Merged
merged 1 commit into from
Apr 11, 2018

Conversation

lxcid
Copy link
Contributor

@lxcid lxcid commented Mar 28, 2018

Previously, ctorData is accessing all the attributes listed in ErrorConfig so it should be define as ErrorConfig instance and renamed as ctorConfig.

The common use case will bind the first 2 arguments of ApolloError.constructor() to name and a common configuration object, leaving the ctorConfig to provide the final customization.

This fix is similar to #34 and #29

We make sure that ctorConfig take precedence over config and merge them whenever necessary.

It may seems scary that I made a lot of changes, but a more powerful diff tool does show that the change is minimum.

screenshot 2018-03-28 10 57 40

Summary:

Previously, ctorData is accessing all the attributes listed in ErrorConfig so it should be define as ErrorConfig instance and renamed as ctorConfig.

The common use case will bind the first 2 arguments of ApolloError.constructor() to name and a common configuration object, leaving the ctorConfig to provide the final customization.

We make sure that ctorConfig take precedence over config and merge them whenever necessary.
@lxcid
Copy link
Contributor Author

lxcid commented Mar 28, 2018

I also make sure to branch from master without #35 so this can go into the 1.7.x release

@lxcid
Copy link
Contributor Author

lxcid commented Mar 28, 2018

Expand my diff program a bit so that it doesn't wrap to next line.

screenshot 2018-03-28 11 08 47

@thebigredgeek thebigredgeek merged commit 76508ce into thebigredgeek:master Apr 11, 2018
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.

2 participants