-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add contract Graph API mock #73
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds a new schema.graphql file that defines the schema for the Vault and UnderlyingAsset types. The Vault type represents a financial vault storing assets and managing them, while the UnderlyingAsset type represents the underlying asset stored in a vault. The schema also includes a custom scalar type to represent large decimal numbers with precision and a custom scalar type to represent large integers.
🚀 fix(package.json): update project name to "eonian" to fix yarn workspace error The project name has been updated to "eonian" to fix yarnpkg/yarn#7734. Also add dependencies that create conflicts: - "glob": "^8.0.1" - "yargs": "^17.6.2" - "graphql": "^16.6.0" - "@apollo/server": "^4.6.0" - "@types/node": "^18.15.11" 🔧 feature(web): use type module for package json and fix PostCSS and Prettier configuration files to work with them
The section title was renamed to better reflect the nature of the issues described. 🎉 feat(mock.ts): add mock server for GraphQL API A new file `mock.ts` was added to the `packages/web` directory. It contains a mock server for the GraphQL API. The mock server uses the `@graphql-tools/mock` package to generate mock data for the API. The `@graphql-tools/load` and `@graphql-tools/graphql-file-loader` packages are used to load the schema from a file. The `@apollo/server` and `@apollo/server/standalone` packages are used to start the server. The `ts-node` package is used to run the mock server. The mock server can be started by running the `yarn mock` command. 🔧 chore(web): update dependencies in package.json and tsconfig.json The `@types/node` and `
✨ feat(web): add mocking server script to package.json The README.md file has been updated to include instructions on how to start the mocking server for development purposes. The mocking server allows developers to mock the API for querying data from the blockchain and other services. The package.json file has been updated to include a new script for starting the mocking server.
✨ feat(web): add support for GraphQL API The GraphQL API is now supported in the web application. The `apollo-client` package is added to the dependencies, and the `apollo.client.ts` file is created to initialize the client. The `get-vaults.query.ts` file is created to define the `GetVaultsQuery` and `getVaults` function to query the vaults. The `index.ts` file is created to export the `apollo-client` and `getVaults` function. The `codegen.ts` file is created to generate types for the GraphQL API. 🔧 chore(web): generate types for GraphQL API The `gen:gql-types` script is added to the `package.json` file to generate types for the GraphQL API using the `graphql-codegen` package. The `@graphql-codegen/cli`, `@graphql-codegen/client
🔨 refactor(mock.ts): add graphql-scalars mocks and resolvers 📦 feat(web): add graphql-scalars package The README.md file has been updated to improve the readability of the yarn workspace command. The mock.ts file has been refactored to include graphql-scalars mocks and resolvers. The graphql-scalars package has been added to the web package.json file. This package provides a set of common scalar types used in GraphQL APIs.
…issues 🔧 fix(package.json): remove nohoist for ts-node and typescript to suppoer graphql codegen ✨ feat(web): generate gql.ts and fragment-masking.ts files to api/gql directory The README.md file now includes a reference to the development.md file, which lists known development issues. The nohoist configuration for ts-node and typescript has been removed from the package.json file. The web package now includes the gql.ts and fragment-masking.ts files in the api/gql directory. 🔧 fix(web): update graphql codegen configuration The graphql codegen configuration has been updated to include TypeScript files in addition to TypeScript React files. The schema.graphql.json file generation has been removed. The package.json file has been updated to include the "type" field with a value of "module". The "type" field is required for Node.js to recognize the package as an ECMAScript module.
🚀 chore(get-vaults.query.ts): add type export for GetVaultsQuery and add JSDoc for getVaults function The unused import and console.log statement have been removed from the page.tsx file. The getVaults function now exports the GetVaultsQuery type and has a JSDoc comment to explain its usage.
…ifying dApp, and verifying smart contracts Three new workflows have been added to the repository. The `check-api-compatibility.yaml` workflow checks the compatibility of the dApp API by running tests on the `packages/web/schema.graphql` file. The `verify-dapp.yaml` workflow verifies the dApp by running tests on the `packages/web` directory. The `verify-smart-contracts.yaml` workflow verifies the smart contracts by running tests on the `packages/contracts` directory. These workflows are triggered on push and pull request events on the `main` branch.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
The job name was changed from "check" to "test" to better reflect its purpose. The step name was also updated from "Test dApp" to "Run tests" to more accurately describe what the step does.
…version The linting job is added to the verify-dapp workflow after the migration to nextjs version with the given fix vercel/next.js#44424. This is done to ensure that the codebase is consistent and follows the best practices.
… run jest ✨ feat(web): add command to run jest with ESM modules enabled Jest was failing to run tests in the web package due to issues with ESM modules. The solution was to add a command that enables ESM modules for node and then run jest. The command added to the package.json file in the web package is `yarn jest --watchAll`. The `jest.config.js` file was also updated to use an ES6 import statement instead of a `require` statement.
solovev
approved these changes
Apr 8, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(schema.graphql): add schema for Vault and UnderlyingAsset
This commit adds a new schema.graphql file that defines the schema for the Vault and UnderlyingAsset types. The Vault type represents a financial vault storing assets and managing them, while the UnderlyingAsset type represents the underlying asset stored in a vault. The schema also includes a custom scalar type to represent large decimal numbers with precision and a custom scalar type to represent large integers.
fix(README.md): add solution to known issue with yarn workspace
rocket fix(package.json): update project name to "eonian" to fix yarn workspace error
The project name has been updated to "eonian" to fix yarnpkg/yarn#7734. Also add dependencies that create conflicts:
feature(web): use type module for package json and fix PostCSS and Prettier configuration files to work with them
feat(README.md): rename Known Issues to Known Development Issues
The section title was renamed to better reflect the nature of the issues described.
tada feat(mock.ts): add mock server for GraphQL API
A new file
mock.ts
was added to thepackages/web
directory. It contains a mock server for the GraphQL API. The mock server uses the@graphql-tools/mock
package to generate mock data for the API. The@graphql-tools/load
and@graphql-tools/graphql-file-loader
packages are used to load the schema from a file. The@apollo/server
and@apollo/server/standalone
packages are used to start the server. Thets-node
package is used to run the mock server. The mock server can be started by running theyarn mock
command.chore(web): update dependencies in package.json and tsconfig.json
docs(web): update README.md with mocking server instructions
feat(web): add mocking server script to package.json
The README.md file has been updated to include instructions on how to start the mocking server for development purposes. The mocking server allows developers to mock the API for querying data from the blockchain and other services. The package.json file has been updated to include a new script for starting the mocking server.
feat(web): add support for GraphQL API and generate types
feat(web): add support for GraphQL API
The GraphQL API is now supported in the web application. The
apollo-client
package is added to the dependencies, and theapollo.client.ts
file is created to initialize the client. Theget-vaults.query.ts
file is created to define theGetVaultsQuery
andgetVaults
function to query the vaults. Theindex.ts
file is created to export theapollo-client
andgetVaults
function. Thecodegen.ts
file is created to generate types for the GraphQL API.chore(web): generate types for GraphQL API
The
gen:gql-types
script is added to thepackage.json
file to generate types for the GraphQL API using thegraphql-codegen
package. The@graphql-codegen/cli
, `@graphql-codegen/clientchore(README.md): improve readability of yarn workspace command
refactor(mock.ts): add graphql-scalars mocks and resolvers
feat(web): add graphql-scalars package
The README.md file has been updated to improve the readability of the yarn workspace command. The mock.ts file has been refactored to include graphql-scalars mocks and resolvers. The graphql-scalars package has been added to the web package.json file. This package provides a set of common scalar types used in GraphQL APIs.
docs(README.md): add development.md file to list known development issues
fix(package.json): remove nohoist for ts-node and typescript to suppoer graphql codegen
feat(web): generate gql.ts and fragment-masking.ts files to api/gql directory
The README.md file now includes a reference to the development.md file, which lists known development issues. The nohoist configuration for ts-node and typescript has been removed from the package.json file. The web package now includes the gql.ts and fragment-masking.ts files in the api/gql directory.
fix(web): update graphql codegen configuration
The graphql codegen configuration has been updated to include TypeScript files in addition to TypeScript React files. The schema.graphql.json file generation has been removed. The package.json file has been updated to include the "type" field with a value of "module". The "type" field is required for Node.js to recognize the package as an ECMAScript module.
refactor(page.tsx): remove unused import and console.log
chore(get-vaults.query.ts): add type export for GetVaultsQuery and add JSDoc for getVaults function
The unused import and console.log statement have been removed from the page.tsx file. The getVaults function now exports the GetVaultsQuery type and has a JSDoc comment to explain its usage.
chore(workflows): add workflows for checking API compatibility, verifying dApp, and verifying smart contracts
Three new workflows have been added to the repository. The
check-api-compatibility.yaml
workflow checks the compatibility of the dApp API by running tests on thepackages/web/schema.graphql
file. Theverify-dapp.yaml
workflow verifies the dApp by running tests on thepackages/web
directory. Theverify-smart-contracts.yaml
workflow verifies the smart contracts by running tests on thepackages/contracts
directory. These workflows are triggered on push and pull request events on themain
branch.