Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly use package.json for functions typegen #1558

Merged
merged 1 commit into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app/src/cli/services/function/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('buildGraphqlTypes', () => {

// Then
await expect(got).resolves.toBeUndefined()
expect(exec).toHaveBeenCalledWith('npm', ['exec', '--', 'graphql-code-generator'], {
expect(exec).toHaveBeenCalledWith('npm', ['exec', '--', 'graphql-code-generator', '--config', 'package.json'], {
cwd: ourFunction.directory,
stderr,
signal,
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/cli/services/function/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export async function buildGraphqlTypes(
throw new Error('GraphQL types can only be built for JavaScript functions')
}

return exec('npm', ['exec', '--', 'graphql-code-generator'], {
return exec('npm', ['exec', '--', 'graphql-code-generator', '--config', 'package.json'], {
cwd: fun.directory,
stderr: options.stderr,
signal: options.signal,
Expand Down