         wait(for: [expectation], timeout: 10)
     }
     
-    // TODO Adjust this to expect an Observable when GraphQL is piped up correctly.
     func testSubscription() throws {
+        let disposeBag = DisposeBag()
+        
         let subscription = """
         subscription {
             subscribeUser {

        }
        """
        
        let expected = GraphQLResult(data: [
            "subscribeUser": [
                "user": [
                    "name": "John Doe",
                    "id": "123"
                ]
            ]
        ])
        
        let result = try api.subscribe(
            request: subscription,
            context: api.context,
            on: group
        ).wait()
        print(result)
//        let observable = try api.subscribe(
//            request: subscription,
//            context: api.context,
//            on: group
//        ).wait().observable!
        
        let expectation = XCTestExpectation()
        
//        var currentResult = GraphQLResult()
//        let _ = observable.subscribe { event in
//            event.element!.whenSuccess { result in
//                currentResult = result
//                expectation.fulfill()
//            }
//        }
//
//        pubsub.onNext(User(id: "124", name: "Jerry"))
//
//        wait(for: [expectation], timeout: 10)
//
//        XCTAssertEqual(currentResult, expected)
    }
}


import RxSwift
@testable import Graphiti

let pubsub = PublishSubject<Any>()

struct ID : Codable {
    let id: String
