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've looked in the docs and discussion and unable to find an answer to this.
Is it even possible? Say for instance, i have endpoint
/api/my-endpoint/arg1=arg1&locale=en
Im wondering if this can then be routed to a GQL query that is stored in code (whereby i pass arg1 & locale ) eg:
query MyCustomQuery($arg MY_TYPE, $localeL LOCALE = EN ) {
Collection(draft: false) {
docs {
title
}
}
}
Apologies if this isnt clear. I need it this way as my team and company expect to PayloadCMS to slot into our existing backend where the incoming args and params are set. I've looked into the REST interface briefly but unsure if this is possible either.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've looked in the docs and discussion and unable to find an answer to this.
Is it even possible? Say for instance, i have endpoint
/api/my-endpoint/arg1=arg1&locale=en
Im wondering if this can then be routed to a GQL query that is stored in code (whereby i pass arg1 & locale ) eg:
Apologies if this isnt clear. I need it this way as my team and company expect to PayloadCMS to slot into our existing backend where the incoming args and params are set. I've looked into the REST interface briefly but unsure if this is possible either.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions