# queryTweets works, but getTweets does not work

**URL:** <https://discuss.dgraph.io/t/querytweets-works-but-gettweets-does-not-work/9189>\
**Category:** GraphQL\
**Tags:** kind:bug\
**Created:** [August 3, 2020, 4:45pm UTC](https://discuss.dgraph.io/t/querytweets-works-but-gettweets-does-not-work/9189 "2020-08-03T16:45:15Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [August 4, 2020, 10:50am UTC](https://discuss.dgraph.io/t/querytweets-works-but-gettweets-does-not-work/9189/3 "2020-08-04T10:50:41Z")

</div>

The bug is because even though the field `id` represents an xid and has type `String!` because of its name we were considering it to be an ID.

So for example the following schema would work

```auto
type Tweets {
	twitterID: String! @id
	score: Int
}

```

Only when the name of the field with `@id` directive is `id`, this would break. We should have been checking for the type of the field instead of the name. I have fixed this in [fix(GraphQL): Fix getType queries when id was used as a name for types other than ID by pawanrawal · Pull Request #6130 · dgraph-io/dgraph · GitHub](https://github.com/dgraph-io/dgraph/pull/6130)

---

_[View the full topic](https://discuss.dgraph.io/t/querytweets-works-but-gettweets-does-not-work/9189)._
