title: How can I conditionally change the object type name in a graphql query in gatsby at build time?
body: <p>I have static queries in my components that gets data from a db. Here is an example:</p>
  <pre><code>{
    allDbName {
      nodes {
        name
      }
    }
  }
  </code></pre>
  <p>I need a way to conditionally change the object type name (allDbName in the above example) at build time depending on the database we are using. I have tried string interpolation, graphql fragments and variables, and importing graphql queries from another file, but none of these are possible or suitable for this purpose. All the fields will be identical, the only thing that needs to change is the object type name.</p>