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

Add type function to allow querying types. #2933

Merged
merged 3 commits into from
Jan 25, 2019
Merged

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Jan 25, 2019

type(typeName) is the equivalent of eq("type", typeName).

Also added the type predicate as one of the initial predicates
and made sure it does not get deleted when the schema is dropped.


This change is Reviewable

type(typeName) is the equivalent of eq("type", typeName).

Also added the type predicate as one of the initial predicates
and made sure it does not get deleted when the schema is dropped.
Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm: One comment about testing. Rest is good.

Reviewed 8 of 8 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @martinmr)


query/query3_test.go, line 1882 at r1 (raw file):

	js := processToFastJsonNoErr(t, query)
	require.JSONEq(t,
		`{"data": {"me":[{"uid" :"0x2"}]}}`,

Can you add 2-3 Person entities, so this test is a bit more exhaustive?

Copy link
Contributor Author

@martinmr martinmr left a comment

Choose a reason for hiding this comment

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

Reviewable status: 6 of 10 files reviewed, 1 unresolved discussion (waiting on @manishrjain)


query/query3_test.go, line 1882 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Can you add 2-3 Person entities, so this test is a bit more exhaustive?

Done.

@martinmr martinmr merged commit 783afd1 into master Jan 25, 2019
@martinmr martinmr deleted the martinmr/type-query branch January 25, 2019 19:01
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
type(typeName) is the equivalent of eq("type", typeName).

Also added the type predicate as one of the initial predicates
and made sure it does not get deleted when the schema is dropped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants