diff --git a/examples/expressjs/src/setup.ts b/examples/expressjs/src/setup.ts index 4dbf7d6a4..032e67a67 100644 --- a/examples/expressjs/src/setup.ts +++ b/examples/expressjs/src/setup.ts @@ -13,7 +13,7 @@ import * as DIDComm from 'daf-did-comm' import { SodiumFsEncryptionKeyManager } from 'daf-sodium-fs' import { NodeSqlite3 } from 'daf-node-sqlite3' -import { DataStore, Gql as DataGql } from 'daf-data-store' +import { DataStore } from 'daf-data-store' import ws from 'ws' import Debug from 'debug' @@ -89,27 +89,3 @@ export const core = new Daf.Core({ const db = new NodeSqlite3(dataStoreFilename) export const dataStore = new DataStore(db) - -const { ApolloServer } = require('apollo-server-express') -import merge from 'lodash.merge' - -export const apolloServer = new ApolloServer({ - typeDefs: [ - Daf.Gql.baseTypeDefs, - Daf.Gql.Core.typeDefs, - Daf.Gql.IdentityManager.typeDefs, - DataGql.typeDefs, - DIDComm.Gql.typeDefs, - W3c.Gql.typeDefs, - ], - resolvers: merge( - Daf.Gql.Core.resolvers, - Daf.Gql.IdentityManager.resolvers, - DataGql.resolvers, - DIDComm.Gql.resolvers, - W3c.Gql.resolvers, - ), - context: () => ({ dataStore, core }), - introspection: true, - graphqlPath: '/graphql', -}) diff --git a/examples/expressjs/src/web-server.ts b/examples/expressjs/src/web-server.ts index d310ac789..afc17e31f 100644 --- a/examples/expressjs/src/web-server.ts +++ b/examples/expressjs/src/web-server.ts @@ -11,7 +11,7 @@ import exphbs from 'express-handlebars' import sharedsession from 'express-socket.io-session' const bodyParser = require('body-parser') -import { core, dataStore, apolloServer } from './setup' +import { core, dataStore } from './setup' import { webDidDocFromEthrDid } from './web-did-doc' import Debug from 'debug' @@ -138,8 +138,6 @@ async function main() { res.send('OK') }) - apolloServer.applyMiddleware({ app }) - await dataStore.initialize() const server = http.createServer(app) const io = socketio(server)