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

Unexpected attribute 'query' found in query criteria #37

Closed
jamiegalbreath opened this issue Sep 29, 2018 · 4 comments
Closed

Unexpected attribute 'query' found in query criteria #37

jamiegalbreath opened this issue Sep 29, 2018 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@jamiegalbreath
Copy link

It doesnt like query: (ref) => ref.where('d.count', '==', 1) in the following:

   geoQuery = geoFirestore.query({
      center: new firebase.firestore.GeoPoint(mapCenter.lat(), mapCenter.lng()),
      radius: radius,
      query: (ref) => ref.where('d.count', '==', 1)
    });

Has error: Unexpected attribute 'query' found in query criteria

Any thoughts?

@MichaelSolati
Copy link
Owner

Could we see the package.json? (Or a broken example, like a stackblitz link?)

@MichaelSolati MichaelSolati self-assigned this Sep 29, 2018
@MichaelSolati MichaelSolati added the question Further information is requested label Sep 29, 2018
@MichaelSolati
Copy link
Owner

Closing this for now, but if you get the chance to share a working (broken) example we can definitely reopen this!

@jamiegalbreath
Copy link
Author

jamiegalbreath commented Oct 8, 2018

See example here:
https://jsfiddle.net/jamiegalbreath/f5063ya2/8/

It works when below is removed...
query: (ref) => ref.where('d.count', '==', 1)

Full console error:
Uncaught Error: Unexpected attribute 'query' found in query criteria

@MichaelSolati MichaelSolati reopened this Oct 8, 2018
@MichaelSolati
Copy link
Owner

@jamiegalbreath I finally got to test it, I see that the JSFiddle was using version 2.0.2, however custom queries weren't available until v 2.1.0. Try updating to the latest version 2.2.1 and you should be all set.

You can see that here, however it's not indexed 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants