Closed Jiar closed 7 years ago
Protocol 'GraphQLQuery' can only be used as a generic constraint because it has Self or associated type requirements
apolloStore.swift
func rootKey<Operation: GraphQLOperation>(forOperation operation: Operation) -> CacheKey { switch operation { case is GraphQLQuery: // Error return "QUERY_ROOT" case is GraphQLMutation: // Error return "MUTATION_ROOT" default: preconditionFailure("Unknown operation type") } }
We don't yet support Swift 4. I did try running the tests on Xcode 9 in Swift 3 mode, and that seems to work, so I suggest you stick to that for now.
什么时候支持swift4
Protocol 'GraphQLQuery' can only be used as a generic constraint because it has Self or associated type requirements
apolloStore.swift