You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a test which filters the User list by settings field. source
At the moment this test work as expected for knex. mongoose fail by an error:
[
{
message: "'User' Mongo List Adapter failed to determine field responsible for the query condition 'settings'. 'settings' was seen by following the query 'settings'.",
locations: [ { line: 2, column: 3 } ],
path: [ 'users' ],
extensions: { code: 'INTERNAL_SERVER_ERROR' },
uid: 'ckbxrvoxy0000e55l4i2aecuk',
name: 'GraphQLError'
}
]
Traceback:
"Error: 'User' Mongo List Adapter failed to determine field responsible for the query condition 'settings'. 'settings' was seen by following the query 'settings'.
at getRelatedListAdapterFromQueryPath (/nodejs-hackathon-boilerplate-starter-kit/node_modules/@keystonejs/mongo-join-builder/lib/tokenizers.js:31:13)
at simpleTokenizer (/nodejs-hackathon-boilerplate-starter-kit/node_modules/@keystonejs/mongo-join-builder/lib/tokenizers.js:98:26)
at /nodejs-hackathon-boilerplate-starter-kit/node_modules/@keystonejs/mongo-join-builder/lib/query-parser.js:55:27
at Array.map (<anonymous>)
at queryParser (/nodejs-hackathon-boilerplate-starter-kit/node_modules/@keystonejs/mongo-join-builder/lib/query-parser.js:27:47)
at /nodejs-hackathon-boilerplate-starter-kit/node_modules/@keystonejs/mongo-join-builder/lib/query-parser.js:51:48
at Array.map (<anonymous>)
at queryParser (/nodejs-hackathon-boilerplate-starter-kit/node_modules/@keystonejs/mongo-join-builder/lib/query-parser.js:27:47)
at MongooseListAdapter._itemsQuery (/nodejs-hackathon-boilerplate-starter-kit/node_modules/@keystonejs/adapter-mongoose/lib/adapter-mongoose.js:553:23)
at MongooseListAdapter.itemsQuery (/nodejs-hackathon-boilerplate-starter-kit/node_modules/@keystonejs/keystone/lib/adapters/index.js:139:32)
at List._itemsQuery (/nodejs-hackathon-boilerplate-starter-kit/node_modules/@keystonejs/keystone/lib/ListTypes/list.js:670:40)
at List.listQuery (/nodejs-hackathon-boilerplate-starter-kit/node_modules/@keystonejs/keystone/lib/ListTypes/list.js:584:17)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
At the moment the problem is inside mongo-join-builder/lib/query-parser.js:queryParse:44code:
The queryParse logic doesn't expect custom query objects.
The key
The key difference between knex-adapter and mongoose-adapter is the knex-adapter uses listAdapter.fieldAdaptersByPathhere
which desn't used by mongoose-adapterhere
additional
I think it's probably the same problem inside the File field. If anyone tries to filter by file field on Mongo. (I don't test it yet)
The text was updated successfully, but these errors were encountered:
pahaz
changed the title
CustomField inconsistent knex/mongoose
CustomField inconsistent knex/mongoose logic
Jun 27, 2020
Keystone 5 has officially moved into active maintenance mode as we push towards the next major new version Keystone Next, you can find out more information about this transition here.
In an effort to sustain the project going forward, we're cleaning up and closing old issues such as this one. If you feel this issue is still relevant for Keystone Next, please let us know.
Bug report
Describe the bug
I have an
Options
field based on the MuliCheck field example. Options field sourceI have a
User
list like so:I have a test which filters the User list by settings field. source
At the moment this test work as expected for
knex
.mongoose
fail by an error:Traceback:
At the moment the problem is inside
mongo-join-builder/lib/query-parser.js:queryParse:44
code:The
queryParse
logic doesn't expect custom query objects.The key
The key difference between
knex-adapter
andmongoose-adapter
is theknex-adapter
useslistAdapter.fieldAdaptersByPath
herewhich desn't used by
mongoose-adapter
hereadditional
I think it's probably the same problem inside the
File
field. If anyone tries to filter by file field on Mongo. (I don't test it yet)The text was updated successfully, but these errors were encountered: