# How to add typename field to query before execution

**URL:** <https://community.apollographql.com/t/how-to-add-typename-field-to-query-before-execution/5438>\
**Category:** Server\
**Tags:** server\
**Created:** [January 9, 2023, 4:07pm UTC](https://community.apollographql.com/t/how-to-add-typename-field-to-query-before-execution/5438 "2023-01-09T16:07:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedram\_RZM](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/pedram_rzm/32/3693_2.png) [@Pedram\_RZM](https://community.apollographql.com/u/Pedram_RZM)\
**Post date:** [January 9, 2023, 4:07pm UTC](https://community.apollographql.com/t/how-to-add-typename-field-to-query-before-execution/5438/1 "2023-01-09T16:07:36Z")

</div>

Hey

What I’m trying to do is to tag graphql responses based on their \_\_typename and instances returned. So let’s say we have a query like this:

```auto
query {
    getUsers(limit: 2) {
        id
        username
    }
}

```

Assuming this query is going to return a User, The desired tags looks something like User:1, User:2  
How can I add \_\_typename to every query using a Apollo server plugin?
