title: Unable to find any GraphQL type definitions for the following pointers: src/**/*.graphql
body: <p>I am using the <code>@graphql-codegen/cli</code> tool to generate typescript types out of my graphql server.
  Here is my <code>codegen.yml</code> content:</p>
  
  <pre><code>overwrite: true
  schema: "http://localhost:3001/graphql"
  documents: "src/**/*.graphql"
  generates:
    src/generated/graphql.tsx:
      plugins:
        - "typescript"
        - "typescript-operations"
        - "typescript-react-apollo"
    ./graphql.schema.json:
      plugins:
        - "introspection"
  </code></pre>
  
  <p>Here is the <code>package.json</code> script I use to generate my types (<code>yarn schema</code>):</p>
  
  <pre><code>"schema": "graphql-codegen --config codegen.yml"
  </code></pre>
  
  <p>All these have been automatically generated by executing the cli wizard <code>yarn codegen init</code>.</p>
  
  <p>But when I run <code>yarn schema</code>, these are the errors I get:</p>
  
  <p><a href="https://i.stack.imgur.com/5RvHt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5RvHt.png" alt="enter image description here"></a></p>
  
  <p>(server is positively running at <code>http://localhost:3001/graphql</code> and exposes the graph schema.</p>
  
  <p>Thanks for your help and suggestion</p>
  
  <p>Here is the .graphql file hosted in my server (<a href="http://localhost:3001/graphql" rel="noreferrer">http://localhost:3001/graphql</a></p>
  
  <pre><code># -----------------------------------------------
  # !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
  # !!!   DO NOT MODIFY THIS FILE BY YOURSELF   !!!
  # -----------------------------------------------
  
  """Date custom scalar type"""
  scalar Date
  
  type Mutation {
    create_user(user: UserInput!): User!
    create_pofficer(pofficer: POfficerCreateInput!): POfficer!
    create_incident(incident: TIncidentInput!): TIncident!
    add_incident_type(incident_type: TIncidentTypeInput!): TIncidentType!
  }
  
  type POfficer {
    _id: ID!
    userid: ID!
    user: User!
  }
  
  input POfficerCreateInput {
    name: String!
    surname: String!
    phone: String!
  }
  
  type Query {
    users: [User!]!
    pofficers: [POfficer!]!
    incidents: [TIncident!]!
    incident_types: [TIncidentType!]!
  }
  
  type TIncident {
    _id: ID!
    createdAt: Date!
    incidenttype_id: ID!
    pofficer_id: ID!
    toffender_id: ID
    toffender_phone: String!
    carnumber: String!
    incident_status: String!
    pofficer: POfficer!
    toffender: User!
    incident_type: TIncidentType!
  }
  
  input TIncidentInput {
    incidenttype_id: ID!
    pofficer_id: ID!
    toffender_phone: String!
    carnumber: String!
  }
  
  type TIncidentType {
    _id: ID!
    name: String!
    description: String
  }
  
  input TIncidentTypeInput {
    name: String!
    description: String
  }
  
  type User {
    _id: ID!
    name: String!
    surname: String!
    email: String
    phone: String!
  }
  
  input UserInput {
    name: String!
    surname: String!
    email: String!
    phone: String!
  }
  </code></pre>