fix: add back apollo client code generate command (#1124)

* fix: add back appolo generate command

* fix: update to devnet API

* fix: revert to testnet changes

* fix: revert to testnet changes
This commit is contained in:
m.ray 2022-08-23 20:32:54 +01:00 committed by GitHub
parent fbefef59c4
commit d9e098f942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 8 deletions

View File

@ -64,7 +64,7 @@ export interface MarketNames_markets {
*/ */
state: MarketState; state: MarketState;
/** /**
* An instance of or reference to a tradable instrument. * An instance of, or reference to, a tradable instrument.
*/ */
tradableInstrument: MarketNames_markets_tradableInstrument; tradableInstrument: MarketNames_markets_tradableInstrument;
} }

View File

@ -23,7 +23,7 @@ export const getMockBusEventsResult = (): BlockTime => ({
busEvents: [ busEvents: [
{ {
__typename: 'BusEvent', __typename: 'BusEvent',
id: '0', eventId: '0',
}, },
], ],
}); });

View File

@ -12,7 +12,7 @@ export interface BlockTime_busEvents {
/** /**
* the ID for this event * the ID for this event
*/ */
id: string; eventId: string;
} }
export interface BlockTime { export interface BlockTime {

View File

@ -14,7 +14,7 @@ export const STATS_QUERY = gql`
export const TIME_UPDATE_SUBSCRIPTION = gql` export const TIME_UPDATE_SUBSCRIPTION = gql`
subscription BlockTime { subscription BlockTime {
busEvents(types: TimeUpdate, batchSize: 1) { busEvents(types: TimeUpdate, batchSize: 1) {
id eventId
} }
} }
`; `;

View File

@ -178,14 +178,14 @@ export interface MarketList_markets {
/** /**
* decimalPlaces indicates the number of decimal places that an integer must be shifted by in order to get a correct * decimalPlaces indicates the number of decimal places that an integer must be shifted by in order to get a correct
* number denominated in the currency of the market. (uint64) * number denominated in the currency of the market. (uint64)
* *
* Examples: * Examples:
* Currency Balance decimalPlaces Real Balance * Currency Balance decimalPlaces Real Balance
* GBP 100 0 GBP 100 * GBP 100 0 GBP 100
* GBP 100 2 GBP 1.00 * GBP 100 2 GBP 1.00
* GBP 100 4 GBP 0.01 * GBP 100 4 GBP 0.01
* GBP 1 4 GBP 0.0001 ( 0.01p ) * GBP 1 4 GBP 0.0001 ( 0.01p )
* *
* GBX (pence) 100 0 GBP 1.00 (100p ) * GBX (pence) 100 0 GBP 1.00 (100p )
* GBX (pence) 100 2 GBP 0.01 ( 1p ) * GBX (pence) 100 2 GBP 0.01 ( 1p )
* GBX (pence) 100 4 GBP 0.0001 ( 0.01p ) * GBX (pence) 100 4 GBP 0.0001 ( 0.01p )

View File

@ -2,7 +2,8 @@ module.exports = {
client: { client: {
service: { service: {
name: 'vega', name: 'vega',
url: process.env.NX_VEGA_URL, url:
process.env.NX_VEGA_URL || 'https://api.n11.testnet.vega.xyz/graphql',
}, },
includes: ['../../{apps,libs}/**/*.{ts,tsx,js,jsx,graphql}'], includes: ['../../{apps,libs}/**/*.{ts,tsx,js,jsx,graphql}'],
excludes: ['**/generic-data-provider.ts'], excludes: ['**/generic-data-provider.ts'],

View File

@ -42,7 +42,10 @@
"generate": { "generate": {
"builder": "@nrwl/workspace:run-commands", "builder": "@nrwl/workspace:run-commands",
"options": { "options": {
"commands": ["node libs/types/fix-imports"], "commands": [
"npx apollo client:codegen --config=libs/types/apollo.config.js --target=typescript --globalTypesFile=libs/types/src/__generated__/globalTypes.ts",
"node libs/types/fix-imports"
],
"parallel": false "parallel": false
} }
} }