Skip to content

Add predicates to for built-in types.#924

Merged
leebyron merged 1 commit intographql:masterfrom
IvanGoncharov:predicates
Dec 4, 2017
Merged

Add predicates to for built-in types.#924
leebyron merged 1 commit intographql:masterfrom
IvanGoncharov:predicates

Conversation

@IvanGoncharov
Copy link
Copy Markdown
Member

I find myself copy-pasting the same list of built-in scalar names in every new project we start.
In many cases, built-in types/directives should be handled differently so having such simple predicates save a lot of code lines.

Because of circular dependencies, I couldn't figure out file suitable for builtInTypes and isBuiltInType. That's why I created a new one: src/type/builtins.js.
Is it an appropriate filename or should I put somewhere else?

@IvanGoncharov
Copy link
Copy Markdown
Member Author

rebased

@leebyron leebyron merged commit 9204271 into graphql:master Dec 4, 2017
@leebyron
Copy link
Copy Markdown
Contributor

leebyron commented Dec 4, 2017

I made some final edits - renaming a few things for consistency, but I really like this addition. Thanks @IvanGoncharov

@leebyron
Copy link
Copy Markdown
Contributor

leebyron commented Dec 4, 2017

See 134184e for the final edits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants