Skip to content

Commit

Permalink
remove demo code (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmartinmo authored Sep 30, 2022
1 parent f85775f commit cf05fc3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 44 deletions.
10 changes: 2 additions & 8 deletions nft-platform.rest
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
GET http://localhost:3003/ping HTTP/1.1
GET http://localhost:4000/ping HTTP/1.1
###
POST http://localhost:3003/multiply HTTP/1.1
content-type: application/json

{
"value1": "2",
"value2": "3"
}
GET http://localhost:4000/metadata/0x00AA/22 HTTP/1.1
###
GET http://localhost:3003/undefinedRoute HTTP/1.1
###
15 changes: 0 additions & 15 deletions resolvers.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { getConsentMessageToSign, handleAddSignedConsent, consentNeeded as handleConsentNeeded, getRevokeConsentMessageToSign, revokeSignedConsent } from './services/consentService';
import { multiply } from './services/demoService';
import { addPendingMetadataFromClient, getMetadataUploadMessageToSign } from './services/metadataService';
import { MultiplyPayloadDemo } from './types';

export const resolvers = {
Query: {
allBooks: () => {
const mockBooks =[
{ title: 'title1', author: 'author1' },
{ title: 'title2', author: 'author2' }
];
return mockBooks;
},
multiply(_root: any, args: any) {
const payload: MultiplyPayloadDemo = { value1: args.value1 as number, value2: args.value2 as number };
const result = multiply(payload);
const resultObject = { value: result };
return resultObject;
},
getMetadataUploadMessageToSign(_root: any, args: any) {
const txHash = args.txHash as string;
const metadata = args.metadata as string;
Expand Down
11 changes: 0 additions & 11 deletions schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,12 @@ import { gql } from 'apollo-server';
import { TypeSource } from '@graphql-tools/utils';

export const schemaDefs: TypeSource = gql`
type Book {
title: String!
author: String!
}
type MultiplyResult {
value: Int!
}
type Result {
success: Boolean!,
message: String
}
type Query {
allBooks: [Book!]!
multiply(value1: Int!, value2: Int!): MultiplyResult!
getMetadataUploadMessageToSign(txHash: String!, metadata: String!): String!
getConsentMessageToSign: String!
getRevokeConsentMessageToSign: String!
Expand Down
5 changes: 0 additions & 5 deletions services/demoService.ts

This file was deleted.

5 changes: 0 additions & 5 deletions types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@

export interface MultiplyPayloadDemo {
value1: number,
value2: number
}

export interface Result {
success: boolean,
message?: string
Expand Down

0 comments on commit cf05fc3

Please sign in to comment.