Graphql backend fixes and Apollo graphql -api for frontend
Backend now follows graphql specification.
- HTTP Return code tells if there was problem with http protocol stuff
- GraphQL error's thells if there was problems with GraphQL -query itself (but http returncode is still 200)
- UTF-8 is our friend
- In theory, it also now support's variables, it's not tested yet
Apollo graphql frontend.
-
Developer
Build triggered.
-
Developer
-
Developer
Build finished. Tests FAILED. Build results available at: https://jenkins.codecrew.fi/job/Moya/job/moya-mergerequests/299/
-
Developer
-
Developer
Build finished. Tests FAILED. Build results available at: https://jenkins.codecrew.fi/job/Moya/job/moya-mergerequests/300/
-
code/moya-angular/src/app/modules/viplist/viplist.service.ts
11 10 12 11 13 12 import {HttpClient} from '@angular/common/http'; 14 import {MOYA_BASE_URL} from '../../shared/tools/moya-rest.tool'; 13 import {MOYA_BASE_URL, MOYA_REST_URL} from '../../shared/config/moya.config'; 14 import gql from 'graphql-tag'; 15 import {EventUser} from '../../shared/models/event-user.model'; 16 import {Apollo} from 'apollo-angular'; 17 import 'rxjs-compat/add/operator/map'; -
Master
rxjs-compat was removed in master
-
-
Developer
-
Developer
Build finished. Tests FAILED. Build results available at: https://jenkins.codecrew.fi/job/Moya/job/moya-mergerequests/301/
-
code/moya-angular/src/app/modules/viplist/viplist.service.ts
23 67 24 68 /** 25 69 * get vips 26 * @param searchString: searchString, skip to return all vips 27 70 */ 28 public get(searchString?: string): Observable<Array<Vip>> { 29 30 if (!searchString) { 31 return this.http.get(MOYA_BASE_URL + 'v3/vip/all').pipe( 32 switchMap(res => observableForkJoin(...(res as Array<any>), map(apiRow => this.hostPopulator(apiRow))))); 33 } 34 35 return this.http.get(MOYA_BASE_URL + 'v3/vip/search/' + searchString).pipe( 36 switchMap(v => observableForkJoin(...(v as Array<any>), map(x => this.hostPopulator(x))))); 71 public get(): Observable<Array<Vip>> { 72 return this.apollo.watchQuery<VipsQueryRoot>({query: Q_VIPS_N_DATA}).valueChanges.pipe(map(x => { console.log(x.data.vips); return x.data.vips; })); -
Master
Rm console log
-
-
Toggle commit list
-
Developer
Build triggered.
-
Developer
-
Developer
Build finished. Tests FAILED. Build results available at: https://jenkins.codecrew.fi/job/Moya/job/moya-mergerequests/302/
-
Developer
-
Developer
Build finished. Tests FAILED. Build results available at: https://jenkins.codecrew.fi/job/Moya/job/moya-mergerequests/303/
-
Developer
-
Developer
Build finished. Tests FAILED. Build results available at: https://jenkins.codecrew.fi/job/Moya/job/moya-mergerequests/304/
-
test this please
-
merged
Toggle commit list -
-
Please register or sign in to post a comment