Fix apollo.config

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

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

2719
package-lock.json generated

File diff suppressed because it is too large Load Diff

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

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { BikesGQL, BikesQuery, CargoBike } from '../../../generated/graphql';
import { CargoBikesGQL, CargoBikesQuery, CargoBike } from '../../../generated/graphql';
@Component({
selector: 'app-bikes',
@ -9,9 +9,9 @@ import { BikesGQL, BikesQuery, CargoBike } from '../../../generated/graphql';
export class BikesComponent implements OnInit {
displayedColumns: string[] = ['position', 'name', 'weight', 'symbol'];
dataSource = ELEMENT_DATA;
bikes: BikesQuery;
bikes: CargoBikesQuery;
constructor(private bikesGQL: BikesGQL) {
constructor(private bikesGQL: CargoBikesGQL) {
this.bikesGQL.watch().valueChanges.subscribe((result) => {
console.log(result);
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' }
& { cargoBikes: Array<Maybe<(
{ __typename?: 'CargoBike' }
@ -678,8 +678,8 @@ export type BikesQuery = (
)>> }
);
export const BikesDocument = gql`
query Bikes {
export const CargoBikesDocument = gql`
query CargoBikes {
cargoBikes {
id
name
@ -700,8 +700,8 @@ export const BikesDocument = gql`
@Injectable({
providedIn: 'root'
})
export class BikesGQL extends Apollo.Query<BikesQuery, BikesQueryVariables> {
document = BikesDocument;
export class CargoBikesGQL extends Apollo.Query<CargoBikesQuery, CargoBikesQueryVariables> {
document = CargoBikesDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);

10658
yarn.lock

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