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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GraphQL Support #48

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add GraphQL Support #48

wants to merge 6 commits into from

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Sep 26, 2023

PR Feedback (click)

  • 馃憤 Sweep Did Well
  • 馃憥 Sweep Needs Improvement

Description

This PR adds GraphQL support to the Google Play API. It introduces the openapi-to-graphql library to convert the existing OpenAPI specification to a GraphQL schema and serves GraphQL requests alongside the existing RESTful endpoints.

Summary of Changes

  • Added openapi-to-graphql library as a dependency in package.json
  • Created a new file, lib/graphql.js, to convert the OpenAPI specification to a GraphQL schema and serve GraphQL requests
  • Modified server.js to use the new graphql.js file and serve GraphQL requests on the /graphql endpoint
  • Updated the README.md file to document the new GraphQL endpoint and provide instructions for sending GraphQL requests

Please review and merge this PR to enable GraphQL support in the Google Play API.

Fixes #45.


馃帀 Latest improvements to Sweep:


馃挕 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Sep 26, 2023
@sweep-ai sweep-ai bot mentioned this pull request Sep 26, 2023
4 tasks
@sweep-ai
Copy link
Author

sweep-ai bot commented Sep 26, 2023

GitHub actions yielded the following error.

The command that failed is npm start & npx wait-on http://localhost:3000. Here are the relevant lines from the logs:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'express-graphql' imported from /home/runner/work/google-play-api/google-play-api/lib/graphql.js
at new NodeError (node:internal/errors:405:5)
at packageResolve (node:internal/modules/esm/resolve:887:9)
at moduleResolve (node:internal/modules/esm/resolve:936:20)
at defaultResolve (node:internal/modules/esm/resolve:1129:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}

Please note that the error message indicates that the package 'express-graphql' could not be found.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-ai
Copy link
Author

sweep-ai bot commented Sep 27, 2023

GitHub actions yielded the following error.

The command that failed is npm ci. Here are the relevant lines from the logs:

npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: openapi-to-graphql@2.6.3 from lock file
npm ERR! Missing: graphql@15.8.0 from lock file
npm ERR! Missing: cross-fetch@3.1.8 from lock file
npm ERR! Missing: deep-equal@2.2.2 from lock file
npm ERR! Missing: form-data@4.0.0 from lock file
npm ERR! Missing: form-urlencoded@6.1.4 from lock file
npm ERR! Missing: graphql-scalars@1.22.2 from lock file
npm ERR! Missing: graphql-subscriptions@1.2.1 from lock file
npm ERR! Missing: graphql-upload@13.0.0 from lock file
npm ERR! Missing: json-ptr@2.2.0 from lock file
npm ERR! Missing: jsonpath-plus@6.0.1 from lock file
npm ERR! Missing: jsonpointer@5.0.1 from lock file
npm ERR! Missing: oas-validator@5.0.8 from lock file
npm ERR! Missing: pluralize@8.0.0 from lock file
npm ERR! Missing: swagger2openapi@7.0.8 from lock file
npm ERR! Missing: tslib@2.6.2 from lock file
npm ERR! Missing: url-join@4.0.1 from lock file
npm ERR! Missing: ws@7.5.9 from lock file
npm ERR! Missing: node-fetch@2.7.0 from lock file
npm ERR! Missing: es-get-iterator@1.1.3 from lock file
npm ERR! Missing: is-arguments@1.1.1 from lock file
npm ERR! Missing: object-is@1.1.5 from lock file
npm ERR! Missing: which-collection@1.0.1 from lock file
npm ERR! Missing: is-map@2.0.2 from lock file
npm ERR! Missing: is-set@2.0.2 from lock file
npm ERR! Missing: stop-iteration-iterator@1.0.0 from lock file
npm ERR! Missing: iterall@1.3.0 from lock file
npm ERR! Missing: busboy@0.3.1 from lock file
npm ERR! Missing: fs-capacitor@6.2.0 from lock file
npm ERR! Missing: http-errors@1.8.1 from lock file
npm ERR! Missing: object-path@0.11.8 from lock file
npm ERR! Missing: dicer@0.3.0 from lock file
npm ERR! Missing: streamsearch@0.1.2 from lock file
npm ERR! Missing: whatwg-url@5.0.0 from lock file
npm ERR! Missing: call-me-maybe@1.0.2 from lock file
npm ERR! Missing: oas-kit-common@1.0.8 from lock file
npm ERR! Missing: oas-linter@3.2.2 from lock file
npm ERR! Missing: oas-resolver@2.5.6 from lock file
npm ERR! Missing: oas-schema-walker@1.1.5 from lock file
npm ERR! Missing: reftools@1.1.9 from lock file
npm ERR! Missing: should@13.2.3 from lock file
npm ERR! Missing: yaml@1.10.2 from lock file
npm ERR! Missing: fast-safe-stringify@2.1.1 from lock file
npm ERR! Missing: @exodus/schemasafe@1.3.0 from lock file
npm ERR! Missing: node-fetch-h2@2.3.0 from lock file
npm ERR! Missing: yargs@17.7.2 from lock file
npm ERR! Missing: http2-client@1.3.5 from lock file
npm ERR! Missing: should-equal@2.0.0 from lock file
npm ERR! Missing: should-format@3.0.3 from lock file
npm ERR! Missing: should-type@1.4.0 from lock file
npm ERR! Missing: should-type-adaptors@1.1.0 from lock file
npm ERR! Missing: should-util@1.0.1 from lock file
npm ERR! Missing: node-readfiles@0.2.0 from lock file
npm ERR! Missing: es6-promise@3.3.1 from lock file
npm ERR! Missing: tr46@0.0.3 from lock file
npm ERR! Missing: webidl-conversions@3.0.1 from lock file
npm ERR! Missing: is-weakmap@2.0.1 from lock file
npm ERR! Missing: is-weakset@2.0.2 from lock file
npm ERR! Missing: cliui@8.0.1 from lock file
npm ERR! Missing: escalade@3.1.1 from lock file
npm ERR! Missing: get-caller-file@2.0.5 from lock file
npm ERR! Missing: require-directory@2.1.1 from lock file
npm ERR! Missing: y18n@5.0.8 from lock file
npm ERR! Missing: yargs-parser@21.1.1 from lock file
npm ERR! Missing: wrap-ansi@7.0.0 from lock file
npm ERR! Missing: depd@1.1.2 from lock file
npm ERR! Missing: statuses@1.5.0 from lock file
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm ERR! [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info

Please note that the complete log of this run can be found in /home/runner/.npm/_logs/2023-09-27T05_21_17_571Z-debug-0.log.

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

2 similar comments
@sweep-ai
Copy link
Author

sweep-ai bot commented Sep 27, 2023

GitHub actions yielded the following error.

The command that failed is npm ci. Here are the relevant lines from the logs:

npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: openapi-to-graphql@2.6.3 from lock file
npm ERR! Missing: graphql@15.8.0 from lock file
npm ERR! Missing: cross-fetch@3.1.8 from lock file
npm ERR! Missing: deep-equal@2.2.2 from lock file
npm ERR! Missing: form-data@4.0.0 from lock file
npm ERR! Missing: form-urlencoded@6.1.4 from lock file
npm ERR! Missing: graphql-scalars@1.22.2 from lock file
npm ERR! Missing: graphql-subscriptions@1.2.1 from lock file
npm ERR! Missing: graphql-upload@13.0.0 from lock file
npm ERR! Missing: json-ptr@2.2.0 from lock file
npm ERR! Missing: jsonpath-plus@6.0.1 from lock file
npm ERR! Missing: jsonpointer@5.0.1 from lock file
npm ERR! Missing: oas-validator@5.0.8 from lock file
npm ERR! Missing: pluralize@8.0.0 from lock file
npm ERR! Missing: swagger2openapi@7.0.8 from lock file
npm ERR! Missing: tslib@2.6.2 from lock file
npm ERR! Missing: url-join@4.0.1 from lock file
npm ERR! Missing: ws@7.5.9 from lock file
npm ERR! Missing: node-fetch@2.7.0 from lock file
npm ERR! Missing: es-get-iterator@1.1.3 from lock file
npm ERR! Missing: is-arguments@1.1.1 from lock file
npm ERR! Missing: object-is@1.1.5 from lock file
npm ERR! Missing: which-collection@1.0.1 from lock file
npm ERR! Missing: is-map@2.0.2 from lock file
npm ERR! Missing: is-set@2.0.2 from lock file
npm ERR! Missing: stop-iteration-iterator@1.0.0 from lock file
npm ERR! Missing: iterall@1.3.0 from lock file
npm ERR! Missing: busboy@0.3.1 from lock file
npm ERR! Missing: fs-capacitor@6.2.0 from lock file
npm ERR! Missing: http-errors@1.8.1 from lock file
npm ERR! Missing: object-path@0.11.8 from lock file
npm ERR! Missing: dicer@0.3.0 from lock file
npm ERR! Missing: streamsearch@0.1.2 from lock file
npm ERR! Missing: whatwg-url@5.0.0 from lock file
npm ERR! Missing: call-me-maybe@1.0.2 from lock file
npm ERR! Missing: oas-kit-common@1.0.8 from lock file
npm ERR! Missing: oas-linter@3.2.2 from lock file
npm ERR! Missing: oas-resolver@2.5.6 from lock file
npm ERR! Missing: oas-schema-walker@1.1.5 from lock file
npm ERR! Missing: reftools@1.1.9 from lock file
npm ERR! Missing: should@13.2.3 from lock file
npm ERR! Missing: yaml@1.10.2 from lock file
npm ERR! Missing: fast-safe-stringify@2.1.1 from lock file
npm ERR! Missing: @exodus/schemasafe@1.3.0 from lock file
npm ERR! Missing: node-fetch-h2@2.3.0 from lock file
npm ERR! Missing: yargs@17.7.2 from lock file
npm ERR! Missing: http2-client@1.3.5 from lock file
npm ERR! Missing: should-equal@2.0.0 from lock file
npm ERR! Missing: should-format@3.0.3 from lock file
npm ERR! Missing: should-type@1.4.0 from lock file
npm ERR! Missing: should-type-adaptors@1.1.0 from lock file
npm ERR! Missing: should-util@1.0.1 from lock file
npm ERR! Missing: node-readfiles@0.2.0 from lock file
npm ERR! Missing: es6-promise@3.3.1 from lock file
npm ERR! Missing: tr46@0.0.3 from lock file
npm ERR! Missing: webidl-conversions@3.0.1 from lock file
npm ERR! Missing: is-weakmap@2.0.1 from lock file
npm ERR! Missing: is-weakset@2.0.2 from lock file
npm ERR! Missing: cliui@8.0.1 from lock file
npm ERR! Missing: escalade@3.1.1 from lock file
npm ERR! Missing: get-caller-file@2.0.5 from lock file
npm ERR! Missing: require-directory@2.1.1 from lock file
npm ERR! Missing: y18n@5.0.8 from lock file
npm ERR! Missing: yargs-parser@21.1.1 from lock file
npm ERR! Missing: wrap-ansi@7.0.0 from lock file
npm ERR! Missing: depd@1.1.2 from lock file
npm ERR! Missing: statuses@1.5.0 from lock file
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm ERR! [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info

Please note that the complete log of this run can be found in /home/runner/.npm/_logs/2023-09-27T05_21_17_571Z-debug-0.log.

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-ai
Copy link
Author

sweep-ai bot commented Sep 27, 2023

GitHub actions yielded the following error.

The command that failed is npm ci. Here are the relevant lines from the logs:

npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: openapi-to-graphql@2.6.3 from lock file
npm ERR! Missing: graphql@15.8.0 from lock file
npm ERR! Missing: cross-fetch@3.1.8 from lock file
npm ERR! Missing: deep-equal@2.2.2 from lock file
npm ERR! Missing: form-data@4.0.0 from lock file
npm ERR! Missing: form-urlencoded@6.1.4 from lock file
npm ERR! Missing: graphql-scalars@1.22.2 from lock file
npm ERR! Missing: graphql-subscriptions@1.2.1 from lock file
npm ERR! Missing: graphql-upload@13.0.0 from lock file
npm ERR! Missing: json-ptr@2.2.0 from lock file
npm ERR! Missing: jsonpath-plus@6.0.1 from lock file
npm ERR! Missing: jsonpointer@5.0.1 from lock file
npm ERR! Missing: oas-validator@5.0.8 from lock file
npm ERR! Missing: pluralize@8.0.0 from lock file
npm ERR! Missing: swagger2openapi@7.0.8 from lock file
npm ERR! Missing: tslib@2.6.2 from lock file
npm ERR! Missing: url-join@4.0.1 from lock file
npm ERR! Missing: ws@7.5.9 from lock file
npm ERR! Missing: node-fetch@2.7.0 from lock file
npm ERR! Missing: es-get-iterator@1.1.3 from lock file
npm ERR! Missing: is-arguments@1.1.1 from lock file
npm ERR! Missing: object-is@1.1.5 from lock file
npm ERR! Missing: which-collection@1.0.1 from lock file
npm ERR! Missing: is-map@2.0.2 from lock file
npm ERR! Missing: is-set@2.0.2 from lock file
npm ERR! Missing: stop-iteration-iterator@1.0.0 from lock file
npm ERR! Missing: iterall@1.3.0 from lock file
npm ERR! Missing: busboy@0.3.1 from lock file
npm ERR! Missing: fs-capacitor@6.2.0 from lock file
npm ERR! Missing: http-errors@1.8.1 from lock file
npm ERR! Missing: object-path@0.11.8 from lock file
npm ERR! Missing: dicer@0.3.0 from lock file
npm ERR! Missing: streamsearch@0.1.2 from lock file
npm ERR! Missing: whatwg-url@5.0.0 from lock file
npm ERR! Missing: call-me-maybe@1.0.2 from lock file
npm ERR! Missing: oas-kit-common@1.0.8 from lock file
npm ERR! Missing: oas-linter@3.2.2 from lock file
npm ERR! Missing: oas-resolver@2.5.6 from lock file
npm ERR! Missing: oas-schema-walker@1.1.5 from lock file
npm ERR! Missing: reftools@1.1.9 from lock file
npm ERR! Missing: should@13.2.3 from lock file
npm ERR! Missing: yaml@1.10.2 from lock file
npm ERR! Missing: fast-safe-stringify@2.1.1 from lock file
npm ERR! Missing: @exodus/schemasafe@1.3.0 from lock file
npm ERR! Missing: node-fetch-h2@2.3.0 from lock file
npm ERR! Missing: yargs@17.7.2 from lock file
npm ERR! Missing: http2-client@1.3.5 from lock file
npm ERR! Missing: should-equal@2.0.0 from lock file
npm ERR! Missing: should-format@3.0.3 from lock file
npm ERR! Missing: should-type@1.4.0 from lock file
npm ERR! Missing: should-type-adaptors@1.1.0 from lock file
npm ERR! Missing: should-util@1.0.1 from lock file
npm ERR! Missing: node-readfiles@0.2.0 from lock file
npm ERR! Missing: es6-promise@3.3.1 from lock file
npm ERR! Missing: tr46@0.0.3 from lock file
npm ERR! Missing: webidl-conversions@3.0.1 from lock file
npm ERR! Missing: is-weakmap@2.0.1 from lock file
npm ERR! Missing: is-weakset@2.0.2 from lock file
npm ERR! Missing: cliui@8.0.1 from lock file
npm ERR! Missing: escalade@3.1.1 from lock file
npm ERR! Missing: get-caller-file@2.0.5 from lock file
npm ERR! Missing: require-directory@2.1.1 from lock file
npm ERR! Missing: y18n@5.0.8 from lock file
npm ERR! Missing: yargs-parser@21.1.1 from lock file
npm ERR! Missing: wrap-ansi@7.0.0 from lock file
npm ERR! Missing: depd@1.1.2 from lock file
npm ERR! Missing: statuses@1.5.0 from lock file
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm ERR! [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info

Please note that the complete log of this run can be found in /home/runner/.npm/_logs/2023-09-27T05_21_17_571Z-debug-0.log.

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep (slow): GraphQL Support
0 participants