Skip to content
Open
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
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# We'll let Git's auto-detection algorithm infer if a file is text. If it is,
# enforce LF line endings regardless of OS or git configurations.
* text=auto eol=lf

# Isolate binary files in case the auto-detection algorithm fails and
# marks them as text files (which could brick them).
*.{png,jpg,jpeg,gif,webp,woff,woff2} binary
2 changes: 1 addition & 1 deletion modules-js/hapi-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@types/hoek": "^4.1.3",
"@types/jest": "24.x.x",
"graphql-extensions": "^0.6.0",
"@hapi/hapi": ">=20.1.0",
"@hapi/hapi": ">=20.1.5",
"jest": "^24.8.0",
"rimraf": "^2.6.2",
"rollbar": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion modules-js/hapi-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@types/node-fetch": "^2.1.2",
"@types/react": "^16.8.5",
"@types/react-dom": "^16.8.4",
"@hapi/hapi": ">=20.1.0",
"@hapi/hapi": ">=20.1.5",
"jest": "^24.8.0",
"rimraf": "^2.6.2",
"tsc-watch": "^1.0.26",
Expand Down
1 change: 1 addition & 0 deletions modules-js/mssql-common/src/mssql-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export async function createConnectionPool(
multiSubnetFailover: multiSubnetFailoverVal,
// @ts-ignore
packetSize: packet_Size,
requestTimeout: 45000,
},
};

Expand Down
7 changes: 2 additions & 5 deletions services-js/access-boston/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
"<rootDir>/scripts/"
]
},
"resolutions": {
"graphql": "0.13.2"
},
"dependencies": {
"@babel/runtime": "^7.6.0",
"@cityofboston/deploy-tools": "^0.0.0",
Expand All @@ -46,7 +43,7 @@
"@cityofboston/srv-decrypt-env": "^0.0.0",
"@emotion/core": "^10.0.10",
"apollo-boost": "^0.4.4",
"apollo-server-hapi": "^2.5.0",
"apollo-server-hapi": "^3.6.3",
"boom": "^7.2.0",
"catbox-redis": "^4.2.2",
"core-js": "^3.3.0",
Expand All @@ -56,7 +53,7 @@
"emotion": "^10.0.9",
"emotion-server": "^10.0.9",
"formik": "^1.4.2",
"graphql": "^14.3.0",
"graphql": "^16.3.0",
"hapi": "^17.5.2",
"hapi-accept-language2": "^2.0.3",
"hapi-cors": "^1.0.3",
Expand Down
7 changes: 2 additions & 5 deletions services-js/commissions-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
"<rootDir>/scripts/"
]
},
"resolutions": {
"graphql": "0.13.2"
},
"dependencies": {
"@babel/runtime": "^7.6.0",
"@cityofboston/form-common": "^0.0.0",
Expand All @@ -45,14 +42,14 @@
"@cityofboston/srv-decrypt-env": "^0.0.0",
"@emotion/core": "^10.0.10",
"@types/yup": "^0.26.0",
"apollo-server-hapi": "^2.5.0",
"apollo-server-hapi": "^3.6.3",
"boom": "^7.2.0",
"core-js": "^2.6.4",
"dataloader": "^1.4.0",
"dotenv": "^5.0.1",
"emotion": "^10.0.9",
"formik": "^1.4.2",
"graphql": "^14.3.0",
"graphql": "^16.3.0",
"handlebars": "^4.0.12",
"@hapi/hapi": ">=20.1.0",
"hapi-accept-language2": "^2.0.3",
Expand Down
2 changes: 1 addition & 1 deletion services-js/commissions-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"apollo-cache-inmemory": "^1.5.1",
"apollo-client": "^2.5.1",
"apollo-link-http": "^1.5.14",
"graphql": "^14.3.0",
"graphql": "^16.3.0",
"graphql-tag": "^2.10.1",
"immutability-helper": "^2.7.1",
"react": "16.8.5",
Expand Down
7 changes: 2 additions & 5 deletions services-js/group-mgmt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,19 @@
"<rootDir>/scripts/"
]
},
"resolutions": {
"graphql": "0.13.2"
},
"dependencies": {
"@babel/runtime": "7.1.2",
"@cityofboston/deploy-tools": "^0.0.0",
"@cityofboston/hapi-common": "^0.0.0",
"@cityofboston/srv-decrypt-env": "^0.0.0",
"apollo-server-hapi": "^2.5.0",
"apollo-server-hapi": "^3.6.3",
"boom": "^7.2.0",
"catbox-redis": "^4.2.2",
"core-js": "^3.3.0",
"crumb": "^7.1.0",
"dotenv": "^5.0.1",
"emotion-server": "^10.0.9",
"graphql": "^14.3.0",
"graphql": "^16.3.0",
"hapi": "^17.5.2",
"hapi-accept-language2": "^2.0.3",
"hapi-dev-errors": "^3.0.1",
Expand Down
4 changes: 2 additions & 2 deletions services-js/permit-finder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
"@cityofboston/percy-common": "^0.0.0",
"@cityofboston/srv-decrypt-env": "^0.0.0",
"@emotion/core": "^10.0.10",
"apollo-server-hapi": "^2.5.0",
"apollo-server-hapi": "^3.6.3",
"autolinker": "^3.0.5",
"aws-sdk": "^2.245.1",
"boom": "^7.2.0",
"core-js": "^3.6.4",
"csv-parser": "^2.3.0",
"date-fns": "^1.29.0",
"dotenv": "^5.0.1",
"graphql": "^14.3.0",
"graphql": "^16.3.0",
"hapi": "^17.5.2",
"hapi-dev-errors": "^3.0.1",
"inert": "^5.1.0",
Expand Down
45 changes: 29 additions & 16 deletions services-js/registry-certs/client/dao/DeathCertificatesDao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class DeathCertificatesDao {
async search(
fullQuery: string,
page: number
): Promise<DeathCertificateSearchResults> {
): Promise<any> /*Promise<DeathCertificateSearchResults>*/ {
if (fullQuery === this.cacheFullQuery) {
const results = this.cacheByPage[page];
if (results) {
Expand All @@ -45,21 +45,34 @@ export default class DeathCertificatesDao {

const { query, startYear, endYear } = this.parseQuery(fullQuery);

const results = await searchDeathCertificates(
this.fetchGraphql,
query,
page,
startYear,
endYear
);

this.cacheByPage[page] = results;

results.results.forEach(cert => {
this.loader.prime(cert.id, cert);
});

return results;
// console.log('DeathCertificateDao > page: ', page);
// console.log('DeathCertificateDao > query: ', query);

try {
const results = await searchDeathCertificates(
this.fetchGraphql,
query,
page,
startYear,
endYear
);

this.cacheByPage[page] = results;

// eslint-disable-next-line no-console
// console.log(
// 'DeathCertificateDao > this.cacheByPage: ',
// this.cacheByPage[page]
// );

results.results.forEach(cert => {
this.loader.prime(cert.id, cert);
});

return results;
} catch (error) {
console.log('Error talking to GraphQL endpoint');
}
}

async lookupOrder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class SearchPage extends Component<Props, State> {

if (q) {
page = parseInt(getParam(query.page, '1'), 10);
console.log('SearchPage > q: ', q);

results = await deathCertificatesDao.search(q, page);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,13 @@ export default async function searchDeathCertificates(
QUERY,
queryVariables
);
// eslint-disable-next-line no-console
// console.log(
// 'search-death-certificates > searchDeathCertificates: ',
// response.deathCertificates.search,
// response.deathCertificates,
// response
// );

return response.deathCertificates.search;
}
8 changes: 4 additions & 4 deletions services-js/registry-certs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"postdeploy": "ts-node --project ./tsnode.config.json ./scripts/post-deploy",
"clear-babel-cache": "rm -rf node_modules/.cache/babel-loader",
"generate-graphql-schema": "mkdir -p graphql && ts2gql server/graphql/index.ts > graphql/schema.graphql",
"generate-graphql-types": "npx apollo codegen:generate --includes=\"client/queries/*.ts\" --localSchemaFile=graphql/schema.graphql --target=typescript --outputFlat --no-addTypename client/queries/graphql-types.ts",
"generate-graphql-types": "npx apollo client:codegen --includes=\"client/queries/*.ts\" --localSchemaFile=graphql/schema.graphql --target=typescript --outputFlat --no-addTypename client/queries/graphql-types.ts",
"generate-fixtures": "ts-node --project ./tsnode.config.json ./scripts/generate-fixtures"
},
"jest": {
Expand Down Expand Up @@ -54,7 +54,7 @@
"@types/qs": "^6.9.4",
"@zeit/next-source-maps": "^0.0.4-canary.1",
"address-rfc2822": "^2.0.3",
"apollo-server-hapi": "^2.5.0",
"apollo-server-hapi": "^3.6.3",
"aws-sdk": "^2.100.0",
"axios": ">=0.21.1",
"babel-runtime": "^6.26.0",
Expand All @@ -66,9 +66,9 @@
"dotenv": "^5.0.0",
"formik": "^1.4.2",
"good": "^8.1.1",
"graphql": "^14.3.0",
"graphql": "^16.3.0",
"handlebars": "^4.0.11",
"@hapi/hapi": ">=20.1.0",
"@hapi/hapi": ">=20.1.5",
"http-status": "^1.0.1",
"https-proxy-agent": "^2.0.0",
"inert": "^5.1.0",
Expand Down
48 changes: 24 additions & 24 deletions services-js/registry-certs/server/__snapshots__/server.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,73 +6,76 @@ Object {
"__schema": Object {
"types": Array [
Object {
"name": "Query",
"name": "Date",
},
Object {
"name": "DeathCertificates",
"name": "DeathCertificate",
},
Object {
"name": "String",
},
Object {
"name": "DeathCertificate",
},
Object {
"name": "Boolean",
},
Object {
"name": "DeathCertificateOrder",
"name": "DeathCertificateSearch",
},
Object {
"name": "Float",
"name": "Int",
},
Object {
"name": "CertificateOrderItem",
},
Object {
"name": "Int",
"name": "Float",
},
Object {
"name": "DeathCertificateSearch",
"name": "DeathCertificateOrder",
},
Object {
"name": "Mutation",
"name": "DeathCertificates",
},
Object {
"name": "OrderType",
"name": "Query",
},
Object {
"name": "ChargeOrderResult",
"name": "DeathCertificateOrderItemInput",
},
Object {
"name": "ChargeOrderError",
"name": "SubmittedOrder",
},
Object {
"name": "ChargeOrderErrorCode",
"name": "OrderErrorCause",
},
Object {
"name": "DeleteUploadResult",
"name": "OrderError",
},
Object {
"name": "OrderResult",
},
Object {
"name": "BirthCertificateOrderItemInput",
},
Object {
"name": "OrderResult",
"name": "MarriageCertificateOrderItemInput",
},
Object {
"name": "OrderError",
"name": "OrderType",
},
Object {
"name": "OrderErrorCause",
"name": "ChargeOrderErrorCode",
},
Object {
"name": "SubmittedOrder",
"name": "ChargeOrderError",
},
Object {
"name": "DeathCertificateOrderItemInput",
"name": "ChargeOrderResult",
},
Object {
"name": "MarriageCertificateOrderItemInput",
"name": "DeleteUploadResult",
},
Object {
"name": "Mutation",
},
Object {
"name": "__Schema",
Expand All @@ -98,9 +101,6 @@ Object {
Object {
"name": "__DirectiveLocation",
},
Object {
"name": "Date",
},
],
},
},
Expand Down
Loading