```const categories = [ { name: 'search engine' ...
# orm-help
a
Copy code
const categories = [
  { name: 'search engine' },
  { name: 'language translation' },
  { name: 'home life' },
  { name: 'read' },
  { name: 'telecommutin' },
  { name: 'tool' },
  { name: 'learn' },
  { name: 'make money' },
];

const createManyCategories = categories.map((category) =>
  prisma.category.create({
    data: category,
  })
);
I have created some categories like this, I saw on prisma studio they are save as id 1,2,3....8 but when I want to query them from playground, I dont get any id. How can I get it?
r
Hey @Ashiqur Rahman 👋 What is the query you’re writing in the playground? Have you tried adding
id
to the query and run it?
a
Copy code
query Categories {
	categories {
    id
    name
  }
}
output
Copy code
{
  "error": {
    "errors": [
      {
        "message": "Cannot query field \"id\" on type \"Category\".",
        "locations": [
          {
            "line": 3,
            "column": 5
          }
        ]
      }
    ]
  }
}
this is the implentation
r
Have you exposed
id
in your schema.graphql?
a
did you mean schema.prisma? if it is, then yes
r
Not schema.prisma. The schema.graphql file. Are you using Nexus? If not, you must have created a graphql file to create queries and mutations.