Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
projects: {
[serviceName]: {
schemaPath: '',
extensions: {
endpoints: {
[stage]: {
url,
headers,
},
},
},
},
},
}
return new GraphQLConfig(data, '')
}
constructor(context, withoutInit = false) {
try {
this.gqlConfig = graphQLConfig.getGraphQLConfig();
this.fixOldConfig();
} catch (e) {
if (e instanceof graphQLConfig.ConfigNotFoundError) {
const { amplify } = context;
let projectRoot;
if (!withoutInit) {
projectRoot = amplify.getEnvInfo().projectPath || process.cwd();
} else {
projectRoot = process.cwd();
}
const configPath = join(projectRoot, '.graphqlconfig.yml');
this.gqlConfig = new graphQLConfig.GraphQLConfig(null, configPath);
this.gqlConfig.config = {};
} else {
throw e;
}
}
}
static isValidAmplifyProject(project) {