Fix apollo.config

pull/1/head
Max Ehrlicher-Schmidt 4 years ago
parent 9faceaa18f
commit 7c0244e80a

@ -1,6 +1,7 @@
module.exports = { module.exports = {
client: { client: {
service: { service: {
name: "flotte_project",
url: "http://localhost:4000/graphql" url: "http://localhost:4000/graphql"
} }
} }

2663
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,4 +1,4 @@
query Bikes { query CargoBikes {
cargoBikes { cargoBikes {
id id
name name

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { BikesGQL, BikesQuery, CargoBike } from '../../../generated/graphql'; import { CargoBikesGQL, CargoBikesQuery, CargoBike } from '../../../generated/graphql';
@Component({ @Component({
selector: 'app-bikes', selector: 'app-bikes',
@ -9,9 +9,9 @@ import { BikesGQL, BikesQuery, CargoBike } from '../../../generated/graphql';
export class BikesComponent implements OnInit { export class BikesComponent implements OnInit {
displayedColumns: string[] = ['position', 'name', 'weight', 'symbol']; displayedColumns: string[] = ['position', 'name', 'weight', 'symbol'];
dataSource = ELEMENT_DATA; dataSource = ELEMENT_DATA;
bikes: BikesQuery; bikes: CargoBikesQuery;
constructor(private bikesGQL: BikesGQL) { constructor(private bikesGQL: CargoBikesGQL) {
this.bikesGQL.watch().valueChanges.subscribe((result) => { this.bikesGQL.watch().valueChanges.subscribe((result) => {
console.log(result); console.log(result);
this.bikes = result.data; this.bikes = result.data;

@ -657,10 +657,10 @@ export enum CacheControlScope {
} }
export type BikesQueryVariables = Exact<{ [key: string]: never; }>; export type CargoBikesQueryVariables = Exact<{ [key: string]: never; }>;
export type BikesQuery = ( export type CargoBikesQuery = (
{ __typename?: 'Query' } { __typename?: 'Query' }
& { cargoBikes: Array<Maybe<( & { cargoBikes: Array<Maybe<(
{ __typename?: 'CargoBike' } { __typename?: 'CargoBike' }
@ -678,8 +678,8 @@ export type BikesQuery = (
)>> } )>> }
); );
export const BikesDocument = gql` export const CargoBikesDocument = gql`
query Bikes { query CargoBikes {
cargoBikes { cargoBikes {
id id
name name
@ -700,8 +700,8 @@ export const BikesDocument = gql`
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class BikesGQL extends Apollo.Query<BikesQuery, BikesQueryVariables> { export class CargoBikesGQL extends Apollo.Query<CargoBikesQuery, CargoBikesQueryVariables> {
document = BikesDocument; document = CargoBikesDocument;
constructor(apollo: Apollo.Apollo) { constructor(apollo: Apollo.Apollo) {
super(apollo); super(apollo);

10658
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save