# Error when calling perform operation on apollo ios

**URL:** <https://community.apollographql.com/t/error-when-calling-perform-operation-on-apollo-ios/6901>\
**Category:** General\
**Created:** [October 31, 2023, 3:53am UTC](https://community.apollographql.com/t/error-when-calling-perform-operation-on-apollo-ios/6901 "2023-10-31T03:53:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaj90](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/vaj90/32/4691_2.png) [@vaj90](https://community.apollographql.com/u/vaj90)\
**Post date:** [October 31, 2023, 3:53am UTC](https://community.apollographql.com/t/error-when-calling-perform-operation-on-apollo-ios/6901/1 "2023-10-31T03:53:47Z")

</div>

here my code in swift:

```auto
mutation = LoginMutation( email: "sample@gmail.com",password: "pa$$w0rd")

ApolloManager.shared.apollo.perform(mutation: mutation, resultHandler: { result in
            switch result {
                case .success(let graphQLResult):
                    if let data = graphQLResult.data {
                        print("Token: \(data)")
                    } else if let errors = graphQLResult.errors {
                        print(errors)
                    }
                case .failure(let error):
                    print(error)
            }
        })

```

I get an error in the generated file and here is the error

> Instance method ‘perform(mutation:publishResultToStore:context:queue:resultHandler:)’ requires that ‘LoginMutation’ conform to ‘GraphQLMutation’

btw I used pod file to add some references as I followed the documentation.  
here is in my podfile:

```auto
# platform :ios, '9.0'

target 'ProjectName' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for AhenteNew
  pod 'Apollo'
  pod 'Apollo/SQLite'
  pod 'Apollo/WebSocket'

end

```

I used apollo-ios-cli to generate my API but I’m not sure why it is not running. if I made the project not using the podfile the error showed while using the package dependencies, the program would work fine. I don’t know why the error saying cannot conform. please give the solution for this.

---

<div class="post-metadata">

**Author:** ![Justin\_Gonzalez](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/justin_gonzalez/32/5359_2.png) [@Justin\_Gonzalez](https://community.apollographql.com/u/Justin_Gonzalez)\
**Post date:** [February 6, 2025, 8:48pm UTC](https://community.apollographql.com/t/error-when-calling-perform-operation-on-apollo-ios/6901/2 "2025-02-06T20:48:08Z")

</div>

Archived on February 6, 2025, 8:48pm UTC


