File tree Expand file tree Collapse file tree
components/cfb-form-editor/question Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import Component from "@ember/component" ;
22import { computed } from "@ember/object" ;
3- import { inject as service } from "@ember/service" ;
43import { task } from "ember-concurrency" ;
54import layout from "../../../templates/components/cfb-form-editor/question/validation" ;
5+ import { ComponentQueryManager } from "ember-apollo-client" ;
66import allFormatValidatorsQuery from "ember-caluma/gql/queries/all-format-validators" ;
77
8- export default Component . extend ( {
8+ export default Component . extend ( ComponentQueryManager , {
99 layout,
1010
11- apollo : service ( ) ,
12-
1311 init ( ) {
1412 this . _super ( ...arguments ) ;
1513
Original file line number Diff line number Diff line change 11import Service from "@ember/service" ;
22import { task } from "ember-concurrency" ;
3- import { inject as service } from "@ember/service" ;
43import allFormatValidatorsQuery from "ember-caluma/gql/queries/all-format-validators" ;
54import { computed } from "@ember/object" ;
65import { assert } from "@ember/debug" ;
6+ import { ObjectQueryManager } from "ember-apollo-client" ;
7+ import { next } from "@ember/runloop" ;
78
8- export default Service . extend ( {
9- apollo : service ( ) ,
10-
9+ export default Service . extend ( ObjectQueryManager , {
1110 init ( ) {
1211 this . _super ( ...arguments ) ;
13- this . _fetchValidators . perform ( ) ;
12+
13+ next ( this . _fetchValidators , "perform" ) ;
1414 } ,
1515
1616 /**
@@ -42,7 +42,7 @@ export default Service.extend({
4242 } ,
4343
4444 _fetchValidators : task ( function * ( ) {
45- return yield this . get ( " apollo" ) . query (
45+ return yield this . apollo . query (
4646 { query : allFormatValidatorsQuery } ,
4747 "allFormatValidators.edges"
4848 ) ;
You can’t perform that action at this time.
0 commit comments