Kind of a continuation of #190
Currently, when trying to use .findMany in combination with nested some: {} selection causes photon to throw an Invalid Invocation error.
Reason: Error occurred during query validation & transformation:
[2] Query (object)
[2] ↳ findManyEventGroup (field)
[2] ↳ where (argument)
[2] ↳ EventGroupWhereInput (object)
[2] ↳ OR (field)
[2] ↳ EventGroupWhereInput (object)
[2] ↳ participants_some_id (field)
[2] ↳ Field does not exist on enclosing type.
I can confirm this with both the latest stable version([email protected], binary version: 408c0c08746064a56c8ba7cb167bad49f1d2c2f7
) and the latest alpha version([email protected], binary version: 408c0c08746064a56c8ba7cb167bad49f1d2c2f7)

Reproduction: https://github.com/harshit-test-org/prisma-photon-222
Quick update, after playing around with Harshit's repro repo, I can confirm that this problem exists for pretty much all of the filter methods not already solved individually (notIn etc)
Could you take a look at all the current filters and make sure photon knows how to forward them to the query engine? Nik recently updated the nested write/read docs and used startsWith, which currently doesn't work either.
Confirmed not working:
Fixed in latest alpha.
You can try it out with npm i -g prisma2@alpha.
@timsuchanek, this works for me locally (MacOS).
However, on dokku/Heroku, the same query (using some in the filter) fails with the following error:
2019-10-19T08:00:33.347278374Z app[web.1]: { GraphQLError: Error in Photon:
2019-10-19T08:00:33.347464799Z app[web.1]: Error: Reason: Error occurred during query validation & transformation:
2019-10-19T08:00:33.347550779Z app[web.1]: Query (object)
2019-10-19T08:00:33.347622041Z app[web.1]: ↳ findManyEvent (field)
2019-10-19T08:00:33.347688905Z app[web.1]: ↳ where (argument)
2019-10-19T08:00:33.347763185Z app[web.1]: ↳ EventWhereInput (object)
2019-10-19T08:00:33.347815993Z app[web.1]: ↳ AND (field)
2019-10-19T08:00:33.347882522Z app[web.1]: ↳ EventWhereInput (object)
2019-10-19T08:00:33.347934923Z app[web.1]: ↳ staff_some_user (field)
2019-10-19T08:00:33.347999918Z app[web.1]: ↳ Field does not exist on enclosing type.
Photon debug output:
2019-10-19T07:59:54.801094560Z app[web.1]: 2019-10-19T07:59:54.800Z getos { version: 'OpenSSL 1.1.1 11 Sep 2018\n' }
2019-10-19T07:59:54.802022498Z app[web.1]: 2019-10-19T07:59:54.801Z getos { ls: '' }
2019-10-19T07:59:54.803170339Z app[web.1]: 2019-10-19T07:59:54.802Z getos { version: 'OpenSSL 1.1.1 11 Sep 2018\n' }
2019-10-19T07:59:54.803808484Z app[web.1]: 2019-10-19T07:59:54.803Z getos { ls: '' }
2019-10-19T07:59:54.808082251Z app[web.1]: 2019-10-19T07:59:54.807Z getos { platform: 'linux', libssl: '1.1.1' }
2019-10-19T07:59:54.808798941Z app[web.1]: 2019-10-19T07:59:54.808Z getos { platform: 'linux', libssl: '1.1.1' }
@iherger
Can you please make sure that you are using the latest version? I was unable to reproduce this
@pantharshit00 , thanks for following up. It is actually working now, also on Heroku.
am using 2.0.0-alpha.1217 but still not working for me
@kenule500 Please open a new issue with a minimal reproduction
try to update @prisma/cli and @prisma/client to the same version. I had the issue and it fixed it.
Most helpful comment
Fixed in latest alpha.
You can try it out with
npm i -g prisma2@alpha.