@aws-amplify/api-graphql 4.0.1-api-v6-models.6720ee0.0 → 4.0.1-api-v6-models.bc74e14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,6 +9,9 @@ const observeQuery_1 = require("./operations/observeQuery");
|
|
|
9
9
|
function generateModelsProperty(client, params) {
|
|
10
10
|
const models = {};
|
|
11
11
|
const config = params.amplify.getConfig();
|
|
12
|
+
if (!config.API?.GraphQL) {
|
|
13
|
+
throw new Error('The API configuration is missing. This is likely due to Amplify.configure() not being called prior to generateClient().');
|
|
14
|
+
}
|
|
12
15
|
const modelIntrospection = config.API?.GraphQL?.modelIntrospection;
|
|
13
16
|
if (!modelIntrospection) {
|
|
14
17
|
return {};
|