title: Error: Schema must contain uniquely named types but contains multiple types named "DateTime"
body: <p>I'm trying to generate a GraphQL schema.</p>
  
  <p>I have the following Resolvers. The 3 of them are in different files. 2 of them are for gathering data while one of them is just a trigger API to have them collect more data from a data source. </p>
  
  <pre><code>@Resolver()
  export class RefreshDataSchema{
      constructor(
          private readonly aggregatedDataService : AggregateDataService
      ){}
  
      @Mutation(() =&gt; Boolean)
      async refreshTransactions() : Promise&lt;Boolean&gt;{
          Logger.info("Refresh transactions mutation received.");
          return await this.aggregatedDataService.fetchAndAggregateTransactions();
      }
  
      @Mutation(() =&gt; Boolean)
      async refreshAccounts() : Promise&lt;Boolean&gt;{
          Logger.info("Refresh accounts mutation received.");
          return await this.aggregatedDataService.fetchAndAggregateAccounts();
      }
  }
  
  @Resolver(() =&gt; Account)
  export class AccountSchema extends Account{
  
      @Query(() =&gt; Account)
      async getAccount(
          @Arg('query', () =&gt; AccountQuery)
          query: AccountQuery,
      ) {
          const data = await Account.findOne({ where: query });
          if (data === undefined) {
              throw new Error(`Account for query "${JSON.stringify(query)}" could not be found!`);
          }
          return data;
      }
  
      @Query(() =&gt; [Account])
      async getAccounts(
          @Arg('query', () =&gt; AccountQuery)
          query: AccountQuery,
          @Arg('first', { defaultValue: 10 })
          first: number = 10,
          @Arg('offset', { defaultValue: 0 })
          offset: number = 0,
      ) {
          Logger.info(`GraphQL Query: get accounts. @First: ${first} @Offset: ${offset} received.`);
          const data = Account.find({
              take: first,
              skip: offset,
              order: { balance_in_cents: 'DESC' },
              where: query,
          });
  
          if(data === undefined){
              throw new Error(`Account for query "${JSON.stringify(query)}" could not be found!`);
          }
  
          return data;
      }
  
  };
  
  @Resolver(() =&gt; Transaction)
  export class TransactionSchema extends Transaction{
  
      @Query(() =&gt; [Transaction])
      async getTransactions(
          @Arg('query', () =&gt; TransactionQuery)
          query: TransactionQuery,
          @Arg('first', { defaultValue: 10 })
          first: number = 10,
          @Arg('offset', { defaultValue: 0 })
          offset: number = 0,
      ) {
          Logger.info(`GraphQL Query: get transactions. @Query: ${query} @First: ${first} @Offset: ${offset} received.`);
          try{
              let data = await Transaction.find({
                  take: first,
                  skip: offset,
                  order: { executed_on: 'DESC' },
                  where: query
              })
              Logger.info("Transaction data retrieved succesfully.");
              return data;
          } catch(err) {
              Logger.error(err);
              return err;
          }
  
      }
  
  }
  </code></pre>
  
  <p>And the code to generate the schema, which is federated, looks like this:</p>
  
  <pre><code>import { buildSchemaSync} from 'type-graphql';
  import {createResolversMap} from 'type-graphql/dist/utils/createResolversMap';
  import {
      TransactionSchema, AccountSchema, RefreshDataSchema
  } from '../graphql';
  import { printSchema, buildFederatedSchema } from '@apollo/federation';
  import { gql } from 'apollo-server-express';
  
  const compiledSchema = buildSchemaSync({
      resolvers: [
          TransactionSchema,
          AccountSchema,
          RefreshDataSchema
      ],
  });
  
  export const schema = buildFederatedSchema(
      {
        typeDefs: gql(printSchema(compiledSchema)),
        resolvers: createResolversMap(compiledSchema) as any
      }
    );
  </code></pre>
  
  <p>When I attempt to generate, the error I get is this:</p>
  
  <pre><code>Error: Schema must contain uniquely named types but contains multiple types named "DateTime".
  </code></pre>
  
  <p>Not sure where it's getting this "DateTime" from.</p>
  
  <p>Thanks</p>