当前位置: 首页 > 软件库 > 大数据 > 数据查询 >

apollo-angular

授权协议 MIT License
开发语言 Java
所属分类 大数据、 数据查询
软件类型 开源软件
地区 不详
投 递 者 荀增
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Angular

Apollo Angular

Apollo Angular allows you to fetch data from your GraphQL server and use it in building complex and reactive UIs using the Angular framework. Apollo Angular may be used in any context that Angular may be used. In the browser, in NativeScript, or in Node.js when you want to do server-side rendering.

Apollo Angular requires no complex build setup to get up and running. As long as you have a GraphQL server you can get started building out your application with Angular immediately. Apollo Angular works out of the box with both Angular CLI (ng add apollo-angular) and NativeScript with a single install.

Apollo Angular is:

  1. Incrementally adoptable, so that you can drop it into an existing JavaScript app and start using GraphQL for just part of your UI.
  2. Universally compatible, so that Apollo works with any build setup, any GraphQL server, and any GraphQL schema.
  3. Simple to get started with, so you can start loading data right away and learn about advanced features later.
  4. Inspectable and understandable, so that you can have great developer tools to understand exactly what is happening in your app.
  5. Built for interactive apps, so your users can make changes and see them reflected in the UI immediately.
  6. Small and flexible, so you don't get stuff you don't need. The core is under 12kb compressed.
  7. Community driven, because Apollo is driven by the community and serves a variety of use cases. Everything is planned and developed in the open.

Get started today on the app you’ve been dreaming of, and let Apollo Angular take you to the moon!

Installation

It is simple to install Apollo Angular and related libraries

# installing Apollo Angular in Angular CLI
ng add apollo-angular

# installing each piece independently
yarn add @apollo/client apollo-angular graphql

That’s it! You may now use Apollo Angular in any of your Angular environments.

For an amazing developer experience you may also install the Apollo Client Developer tools for Chrome which will give you inspectability into your Apollo Angular data.

  • If you are using Apollo-Client v3, please make sure to use apollo-angular@v2

If you are using Apollo-Client v2, please make sure to use apollo-angular@v1 (and for Angular 10 support, make sure to use v1.10.0)

Usage

Now you may create components that are connected to your GraphQL API.

Finally, to demonstrate the power of Apollo Angular in building interactive UIs let us connect one of your components to your GraphQL server using the Apollo service:

import {Component, OnInit} from '@angular/core';
import {Apollo, gql} from 'apollo-angular';

const GET_DOGS = gql`
  {
    dogs {
      id
      breed
    }
  }
`;

@Component({
  selector: 'dogs',
  template: `
    <ul>
      <li *ngFor="let dog of dogs | async">
        {{dog.breed}}
      </li>
    </ul>
  `,
})
export class DogsComponent implements OnInit {
  dogs: Observable<any>;

  constructor(private apollo: Apollo) {}

  ngOnInit() {
    this.dogs = this.apollo
      .watchQuery({
        query: GET_DOGS,
      })
      .valueChanges.pipe(map(result => result.data && result.data.dogs));
  }
}

To learn more about querying with Apollo Angular be sure to start reading the documentation article on queries.

Documentation

All of the documentation for Apollo Angular including usage articles and helpful recipes lives on: https://www.apollo-angular.com/

Contributing

Read the Apollo Contributor Guidelines.

This project uses Lerna.

Bootstraping:

yarn install

Running tests locally:

yarn test

Formatting code with prettier:

yarn prettier

This project uses TypeScript for static typing. You can get it built into your editor with no configuration by opening this project in Visual Studio Code, an open source IDE which is available for free on all platforms.

  • angular4前后端分离 Apollo Client is the flexible, community-driven GraphQL client for Angular, JavaScript, and native platforms. It is designed from the ground up to make it easy to build UI components tha

  • 参考文章:横向控制流程图 follow轻尘:Apollo代码学习(五)—横纵向控制 follow轻尘:车辆动力学模型 【运动控制】Apollo6.0的lon_controller解析

  • 因为很多模块都会用到本车的车辆状态,包括底盘信息和定位信息 成员函数: Status Update(const localization::LocalizationEstimate& localization, const canbus::Chassis& chassis); double timestamp() const; const localization::Pose& pose() co

  • 你了解 GraphQL 吗? 简单的说,GraphQL是一个开源的查询语言和协议API。GraphQL API是基于REST架构的现代化替代者。不同于REST,GraphQL允许客户端根据其需要请求特定的部分数据,这与请求固定数据结构的方式不同。 GraphQL 是 API 开发领域向前迈进的重要一步。类型安全、内省、文档生成和可预测响应对平台的维护者和平台的使用者都有好处。 怎么借助Apollo

  • 转载自Narol ​​​​​​Apollo Angular 【github】 基础使用 Apollo Client为浏览器提供了获取数据的缓存设置,避免不必要的网络请求,来提升应用的性能。不过有时候也会很复杂,因为我们可能不知道数据从哪里来的,可能是从服务端API加载最新的数据,又可能是从缓存中获取,它完全取决于你自己的设置。但是我们从缓存中获取实时数据时,如果这个数据相对服务器已经过期,问题就会

 相关资料
  • Apollo(阿波罗)是携程框架部门研发的分布式配置中心,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性,适用于微服务配置管理场景。 Swoft 基于 Apollo 提供的 API,在之上进行封装,使之能在 Swoft 中快速使用。 安装 swoft/whoops 作为一个额外的扩展组件,需要手动安装: Composer 安装 com

  • Apollo以ActiveMQ原型为基础,是一个更快、更可靠、更易于维护的消息代理工具。Apache称Apollo为最快、最强健的 STOMP(Streaming Text Orientated Message Protocol,流文本定向消息协议)服务器。 Apollo的特性如下: 支持Stomp 1.0和Stomp 1.1协议 主题和队列 队列浏览器 主题持久订阅 镜像队列 可靠的消息传递 消

  • Apollo Client 是一个全功能的 GraphQL 客户端,用于 React 、Angular 的交互。允许你轻松通过 GraphQL 获取数据并构建 UI 组件。

  • Glimmer Apollo: Ember and Glimmer integration for Apollo Client. Documentation Visit glimmer-apollo.com to read the docs. Compatibility Apollo Client v3.0 or above GlimmerX v0.6 or above Node.js v12 o

  • apollo-link ⚠️ THIS PROJECT HAS BEEN DEPRECATED ⚠️ The Links in this repo have been migrated to the apollo-client project (as of >= @apollo/client@3.0.0). Please refer to the Apollo Client migration g