From 3c09cc467a2aef49a11c19ed33330cbc360d66be Mon Sep 17 00:00:00 2001 From: Alba Rivas Date: Tue, 27 Jun 2023 08:56:10 +0200 Subject: [PATCH 01/33] Multi object query graphql recipe (#817) * fix: graphQL custom field reference * feat: add multiple object query GraphQL recipe fix: data and errors can be returned at the same time * fix: data and errors can come at the same time fix: code review suggestions * fix: revert getContact changes --------- Co-authored-by: pozil --- .../flexipages/GraphQL.flexipage-meta.xml | 6 + .../lwc/graphqlContacts/graphqlContacts.html | 2 +- .../lwc/graphqlContacts/graphqlContacts.js | 2 +- .../data/graphqlMultipleObjectsResponse.json | 94 +++++++++++++++ .../__tests__/graphqlMultipleObjects.test.js | 108 ++++++++++++++++++ .../graphqlMultipleObjects.html | 30 +++++ .../graphqlMultipleObjects.js | 50 ++++++++ .../graphqlMultipleObjects.js-meta.xml | 10 ++ .../graphqlPagination/graphqlPagination.html | 2 +- .../lwc/graphqlRefresh/graphqlRefresh.html | 2 +- .../lwc/graphqlRefresh/graphqlRefresh.js | 3 +- .../graphqlVariables/graphqlVariables.html | 2 +- package-lock.json | 2 +- 13 files changed, 306 insertions(+), 7 deletions(-) create mode 100644 force-app/main/default/lwc/graphqlMultipleObjects/__tests__/data/graphqlMultipleObjectsResponse.json create mode 100644 force-app/main/default/lwc/graphqlMultipleObjects/__tests__/graphqlMultipleObjects.test.js create mode 100644 force-app/main/default/lwc/graphqlMultipleObjects/graphqlMultipleObjects.html create mode 100644 force-app/main/default/lwc/graphqlMultipleObjects/graphqlMultipleObjects.js create mode 100644 force-app/main/default/lwc/graphqlMultipleObjects/graphqlMultipleObjects.js-meta.xml diff --git a/force-app/main/default/flexipages/GraphQL.flexipage-meta.xml b/force-app/main/default/flexipages/GraphQL.flexipage-meta.xml index 19597e47f..e65f44328 100644 --- a/force-app/main/default/flexipages/GraphQL.flexipage-meta.xml +++ b/force-app/main/default/flexipages/GraphQL.flexipage-meta.xml @@ -37,6 +37,12 @@ graphqlPagination + + + graphqlMultipleObjects + c_graphqlMultipleObjects + + region4 Region diff --git a/force-app/main/default/lwc/graphqlContacts/graphqlContacts.html b/force-app/main/default/lwc/graphqlContacts/graphqlContacts.html index 4dc9397ab..02940ea46 100644 --- a/force-app/main/default/lwc/graphqlContacts/graphqlContacts.html +++ b/force-app/main/default/lwc/graphqlContacts/graphqlContacts.html @@ -11,7 +11,7 @@ - - -