Giter Site home page Giter Site logo

ocelotgraphql / ios Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 289 KB

πŸŽ‘πŸ‘† GraphQL at your fingertips

Home Page: https://ocelotgraphql.com

License: MIT License

Swift 88.35% Ruby 11.65%
ios graphql editor graphql-playground ipad iphone swift

ios's Introduction

Ocelot logo

This is an iOS version of GraphQL playgrounds, similar to tools like GraphiQL or GraphQL Playground, with the benefit of a touch-optimized, truly native experience.

Contributing

Ocelot is currently in it's very early stages. As soon as we have a clearly defined roadmap we'll label issues contribution friendly. You can follow the ongoing development through our GitHub project board.

Do you have an interesting feature idea? Create an issue and start the discussion πŸ’­.

Installation

[TBD]

ios's People

Contributors

sebmild avatar slashmo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

doc22940

ios's Issues

Create AppCoordinator

AppCoordinator will coordinate all other coordinators. It's part of the App module and uses a UINavigationController as its Presenter.

Handle Playground opening from without the app

When opening a Playground through Files or the "Recents" popover on iPad, the app is opened without actually opening the selected Playground.

Tasks

  • Implement application(_:open:options:) in AppDelegate
  • Tell AppCoordinator to open a Playground at the given URL

Create App module

According to the wiki page about App Architecture, we'll first have to create the App module. It will be based on the Single-View-Application template, but without the Main.storyboard.

Add simple Playground editor

In order to make this app useful, we need to add a Playground editor. This will be part of the EditorUI module.

Tasks

  • Add PlaygroundViewController
  • Add PlaygroundEditorViewController
  • Add PlaygroundResultViewController
  • Add play button
  • Send request
  • Show result in PlaygroundResultViewController

Playgrounds not showing up in recents

Currently, Playgrounds don’t show up in the recents tab of the PlaygroundBrowser.
Some googling lead to the assumption that this is caused by our com.ocelotgraphql.playground UTI does not conform to public.content.

Set up .ocelotplayground document type

As stated in the wiki, Playgrounds will be stored in .ocelotplayground package files. We'll start to implement this by exporting a UTI from the app module and using this UTI to create a new Ocelot Playground document type.

The exported UTI (com.ocelotgraphql.playground) will then be used to initialize the UIDocumentBrowserViewController in #11.

Create Playground module

The Playground feature module will hold models and logic for Playground creation and editing. We'll start the implementation by creating a UIDocument subclass called Playground.

Add Presenter & Coordinator

Presenter & Coordinator are two protocols that help us to interface between the app and feature modules. A Presenter is an abstraction for something like UINavigationController, whereas Coordinator helps to manage the flow of a specific scene.

Store GitHub personal access token in Keychain

Until we've built our account system we only support GitHub's GraphQL API. Because we don't want to ask the user for their personal access token each time they open the app, we'll ask once when the user is about to create their first playground and then store the token inside Keychain. This not only stores the token securely but automatically syncs the token via iCloud if the user has iCloud Keychain enabled.

  • Implement key-value based Keychain abstraction
  • Store GitHub access token in Keychain when creating a playground
  • Retrieve GitHub access token from Keychain when opening a playground

Set up continuous integration

We'll use Travis CI for continuous integration. Furthermore, Fastlane & Danger will help us to streamline the build and release process.

  • Run unit tests
  • Comment on PRs
  • Deploy a beta build to TestFlight

The CI will be executed by @ocebot, who has to have access to both this repo and our Fastlane Match-managed certificates repository.

Create GitHub playgrounds

As a first step, we should enable the user to create new GitHub GraphQL playgrounds. This will prompt the user to enter their GitHub API authorization token which we can then use as a header value when sending requests.

Add CommonUI module

The CommonUI module will include shared extensions for UIKit and components used by multiple feature modules.

Add NetworkSession

Instead of using URLSession directly we want to build an abstraction on top which allows us to mock the networking inside unit tests. The new NetworkSession protocol will be added to the Common module.

Tasks

  • Create Common module
  • Implement NetworkSession

Open Playgrounds

Currently, we can create new Playgrounds from the GitHub Playground Template, but we cannot edit them. The basic Playground editing functionality will be split across multiple issues (and branches), while this issue is specifically for opening a Playground and showing a barebone UI displaying the Playground's contents without any editing functionality.

Tasks

  • Notify AppCoordinator when a Playground has been opened
  • Create EditorUI module
  • Create EditorCoordinator
  • Create EditorViewController

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.