GraphQL is a new black, a hype over the Internet with a very few real-life examples of how to use it in big in-house projects. I’d like to show the real example of GraphQL Evolution from a small mobile API to a cross-services integration in a high-load Python project that took us 3 years to develop.
Description:
Intro to GraphQL in the Python world.
Step-by-step GraphQL evolution in a big high-load python project:
Step 1. Mobile App API with GraphQL
Step 2. Separate Frontend from Backend in high-load python project using GraphQL
Step 3. Graph services as Proxy via different Graph APIs
Step 4. Replace SqlAlchemy models via Graph
Step 5. Mutations in Graph API
Step 6. A brave new world with GraphQL
For every step, I will provide real examples (metrics, graphics, numbers), problems and solutions that we had during the years 2015 - 2019.
Introduction to interactive data visualisation using R Shinyanamarisaguedes
Shiny is an R library for building interactive webapps. Shiny allows rapid prototyping and quick production of dashboards and interactive data visualisations. This is especially important in situations where putting a real data-driven prototype in the hands of the end user allows for better refining of requirements before passing off to a web development team. This allows to speed up the delivery process and reducing the dependencies on other teams.
Code and solution to exercises available on github: https://github.com/amguedes/ShinySeminar
In this presentation we will have a look at the Dynamic Data functionality introduced in ASP 3.5 SP1. We will examine the architecture, concepts and main components of this framework such as Page Modes, Page Templates, Field Templates and Validation. We will discuss customization options for this type of projects. We will also have a look at the Dynamic Data Wizard tool that did not make into the RTM but may assist you in creation of Dynamic Data web sites.
Introduction to interactive data visualisation using R Shinyanamarisaguedes
Shiny is an R library for building interactive webapps. Shiny allows rapid prototyping and quick production of dashboards and interactive data visualisations. This is especially important in situations where putting a real data-driven prototype in the hands of the end user allows for better refining of requirements before passing off to a web development team. This allows to speed up the delivery process and reducing the dependencies on other teams.
Code and solution to exercises available on github: https://github.com/amguedes/ShinySeminar
In this presentation we will have a look at the Dynamic Data functionality introduced in ASP 3.5 SP1. We will examine the architecture, concepts and main components of this framework such as Page Modes, Page Templates, Field Templates and Validation. We will discuss customization options for this type of projects. We will also have a look at the Dynamic Data Wizard tool that did not make into the RTM but may assist you in creation of Dynamic Data web sites.
It is a talk given by Vivian Zhang, CTO of SupStat Inc which is a leading Data Analytic consulting firm based in New York City, Shanghai and Beijing. NYC Open Data meetup are honored to host this event on Mar 24th,2014. You can find more information at www.meetup.com/nyc-open-data and www.nycopendata.com
These slides have been presented in a webinar about Recoil at the Codete Webinar #3 on August 25th 2020.
Author: Mateusz Bryła (https://www.linkedin.com/in/mateusz-bryła-78aa1572/)
Dreamer, programmer, consultant, trainer. Founder at Lingmates, Team Lead at Codete for Cloudinary.
Excel continues to be the scratchpad for data analysis everywhere, and with new capabilities for JavaScript-based functions and connections to ML based models, you can bring in all of the power of your data analysis tools right inline to your formulas.
A brief run through of the various APIs Google offers for creating free interactive and static data visualizations.
Links mentioned in this presentation: http://dev.kingkool68.com/google-charting-api/list-o-links.html
How to separate frontend from a highload python project with no problems - Py...Oleksandr Tarasenko
Everybody knows that it is hard to scale old highload monolithic projects that use pythonic templates for frontend. I am gonna tell how we transformed our product using trending and proper technologies like GraphQL, Apollo, Node.js with limited developer resources in a short period of time.
Now many developers (not all) have a tendency to use a number of technologies, not understanding how they work and which problems they solve and which ones they create. The talk will be devoted to a review of libraries in Python, which help us work with databases, namely, effectively receive data.
I will try to tell and answer the following questions:
why is it sometimes worth writing RAW SQL;
when it is worth paying attention to ORM, in particular, their advantages and differences;
where and how ORM will be slower, and where there will be no difference;
how and what ORMs can work in asynchronous mode;
what does GraphQL have to do with it and how can it help.
GraphQL Summit 2019 - Configuration Driven Data as a Service Gateway with Gra...Noriaki Tatsumi
In this talk, you’ll learn about techniques used to build a scalable GraphQL based data gateway with the capability to dynamically on-board various new data sources. They include runtime schema evolution and resolver wiring, abstract resolvers, auto GraphQL schema generation from other schema types, and construction of appropriate cache key-values.
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) ExtensionVMware Tanzu
GemFire GraphQL (G2QL) is an extension that adds a new query language for your Apache Geode™ or Pivotal GemFire clusters allowing developers to build web and mobile applications using any standard GraphQL libraries. G2QL provides an out-of-the-box experience by defining GraphQL schema through introspection. It can be deployed to any GemFire cluster and serves a GraphQL endpoint from an embedded jetty server, just like GemFire’s REST endpoint.
We will be demoing G2QL using a sample application that can read and write data to GemFire and share data between applications built using GemFire client APIs, showing you:
- How to use GraphQL to query and mutate data in GemFire
- How to use open-source GraphQL library to build web and mobile applications using GemFire
- How to use GraphQL to deal with object graphs
- How G2QL can simplify their overall architecture
Presenters : Sai Boorlagadda, Staff Software Engineer & Jagdish Mirani, Pivotal
Nikita Galkin "Looking for the right tech stack for GraphQL application"Fwdays
У рамках доповіді ми будемо говорити про реалізації серверної частини GraphQL додатку. Тобто доповідь орієнтована в першу чергу на Node.js розробників. Проте концепції з доповіді можуть бути реалізовані на інших серверних платформах. Ми обговоримо такі питання та варіанти їх вирішення:
дублювання в GraphQL схемі та коді, а так же ризик їх розсинхронізації;
тестування та версіонування GraphQL схеми й додатку;
авторизація та перевірка прав доступа до полів та мутаторів;
продуктивність;
підписки;
реалізація фронтенд компонентів з GraphQL як джерелом даних.
Для слухачів, які не мають досвіду з GraphQL рекомендується ознайомитися з інформацією .
Google App Engine in 40 minutes (the absolute essentials)Python Ireland
This talk covers just the stuff needed to get you up-to-speed with Google App Engine and its associated technologies (based on the Python run-time, of course). In addition to a bit of talking, Paul will also demo a working webapp built and deployed on the App Engine cloud... all in 40 minutes.
4. Automotive Industry website : Analysis of discrete data from the Database to create charts.(2020)
Concepts used : Bootstrap, AngularJS, AJAX, PHP, MySQL, ChartJS
Project Repository : https://github.com/sudharsan8/SwissRanks_Intern
Bill Kidwell took us through his recent experiences creating a GraphQL API using AWS Appsync and AWS Amplify. He covered data model and data access patterns. And updating the GraphQL schema using Appsync’s custom annotations. The result was a DynamoDB backed GraphQL API. He even discussed more complex use cases too.
This was a great topic to share at KYJSUG
It is a talk given by Vivian Zhang, CTO of SupStat Inc which is a leading Data Analytic consulting firm based in New York City, Shanghai and Beijing. NYC Open Data meetup are honored to host this event on Mar 24th,2014. You can find more information at www.meetup.com/nyc-open-data and www.nycopendata.com
These slides have been presented in a webinar about Recoil at the Codete Webinar #3 on August 25th 2020.
Author: Mateusz Bryła (https://www.linkedin.com/in/mateusz-bryła-78aa1572/)
Dreamer, programmer, consultant, trainer. Founder at Lingmates, Team Lead at Codete for Cloudinary.
Excel continues to be the scratchpad for data analysis everywhere, and with new capabilities for JavaScript-based functions and connections to ML based models, you can bring in all of the power of your data analysis tools right inline to your formulas.
A brief run through of the various APIs Google offers for creating free interactive and static data visualizations.
Links mentioned in this presentation: http://dev.kingkool68.com/google-charting-api/list-o-links.html
How to separate frontend from a highload python project with no problems - Py...Oleksandr Tarasenko
Everybody knows that it is hard to scale old highload monolithic projects that use pythonic templates for frontend. I am gonna tell how we transformed our product using trending and proper technologies like GraphQL, Apollo, Node.js with limited developer resources in a short period of time.
Now many developers (not all) have a tendency to use a number of technologies, not understanding how they work and which problems they solve and which ones they create. The talk will be devoted to a review of libraries in Python, which help us work with databases, namely, effectively receive data.
I will try to tell and answer the following questions:
why is it sometimes worth writing RAW SQL;
when it is worth paying attention to ORM, in particular, their advantages and differences;
where and how ORM will be slower, and where there will be no difference;
how and what ORMs can work in asynchronous mode;
what does GraphQL have to do with it and how can it help.
GraphQL Summit 2019 - Configuration Driven Data as a Service Gateway with Gra...Noriaki Tatsumi
In this talk, you’ll learn about techniques used to build a scalable GraphQL based data gateway with the capability to dynamically on-board various new data sources. They include runtime schema evolution and resolver wiring, abstract resolvers, auto GraphQL schema generation from other schema types, and construction of appropriate cache key-values.
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) ExtensionVMware Tanzu
GemFire GraphQL (G2QL) is an extension that adds a new query language for your Apache Geode™ or Pivotal GemFire clusters allowing developers to build web and mobile applications using any standard GraphQL libraries. G2QL provides an out-of-the-box experience by defining GraphQL schema through introspection. It can be deployed to any GemFire cluster and serves a GraphQL endpoint from an embedded jetty server, just like GemFire’s REST endpoint.
We will be demoing G2QL using a sample application that can read and write data to GemFire and share data between applications built using GemFire client APIs, showing you:
- How to use GraphQL to query and mutate data in GemFire
- How to use open-source GraphQL library to build web and mobile applications using GemFire
- How to use GraphQL to deal with object graphs
- How G2QL can simplify their overall architecture
Presenters : Sai Boorlagadda, Staff Software Engineer & Jagdish Mirani, Pivotal
Nikita Galkin "Looking for the right tech stack for GraphQL application"Fwdays
У рамках доповіді ми будемо говорити про реалізації серверної частини GraphQL додатку. Тобто доповідь орієнтована в першу чергу на Node.js розробників. Проте концепції з доповіді можуть бути реалізовані на інших серверних платформах. Ми обговоримо такі питання та варіанти їх вирішення:
дублювання в GraphQL схемі та коді, а так же ризик їх розсинхронізації;
тестування та версіонування GraphQL схеми й додатку;
авторизація та перевірка прав доступа до полів та мутаторів;
продуктивність;
підписки;
реалізація фронтенд компонентів з GraphQL як джерелом даних.
Для слухачів, які не мають досвіду з GraphQL рекомендується ознайомитися з інформацією .
Google App Engine in 40 minutes (the absolute essentials)Python Ireland
This talk covers just the stuff needed to get you up-to-speed with Google App Engine and its associated technologies (based on the Python run-time, of course). In addition to a bit of talking, Paul will also demo a working webapp built and deployed on the App Engine cloud... all in 40 minutes.
4. Automotive Industry website : Analysis of discrete data from the Database to create charts.(2020)
Concepts used : Bootstrap, AngularJS, AJAX, PHP, MySQL, ChartJS
Project Repository : https://github.com/sudharsan8/SwissRanks_Intern
Bill Kidwell took us through his recent experiences creating a GraphQL API using AWS Appsync and AWS Amplify. He covered data model and data access patterns. And updating the GraphQL schema using Appsync’s custom annotations. The result was a DynamoDB backed GraphQL API. He even discussed more complex use cases too.
This was a great topic to share at KYJSUG
Architecture for scalable Angular applications (with introduction and extende...Paweł Żurowski
Architecture for applications that scales. It uses redux pattern and ngrx implementation with effects and store.
It's refreshed (but still 2+) presentation from my inner talk for colegues.
It's refreshed again and extended by quick and dirty introduction to Angular with verbose example.
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
Maintaining high-quality standards in the production of TMT bars is crucial for ensuring structural integrity in construction. Addressing common defects through careful monitoring, standardized processes, and advanced technology can significantly improve the quality of TMT bars. Continuous training and adherence to quality control measures will also play a pivotal role in minimizing these defects.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Courier management system project report.pdfKamal Acharya
It is now-a-days very important for the people to send or receive articles like imported furniture, electronic items, gifts, business goods and the like. People depend vastly on different transport systems which mostly use the manual way of receiving and delivering the articles. There is no way to track the articles till they are received and there is no way to let the customer know what happened in transit, once he booked some articles. In such a situation, we need a system which completely computerizes the cargo activities including time to time tracking of the articles sent. This need is fulfilled by Courier Management System software which is online software for the cargo management people that enables them to receive the goods from a source and send them to a required destination and track their status from time to time.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSEDuvanRamosGarzon1
AIRCRAFT GENERAL
The Single Aisle is the most advanced family aircraft in service today, with fly-by-wire flight controls.
The A318, A319, A320 and A321 are twin-engine subsonic medium range aircraft.
The family offers a choice of engines
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfKamal Acharya
The College Bus Management system is completely developed by Visual Basic .NET Version. The application is connect with most secured database language MS SQL Server. The application is develop by using best combination of front-end and back-end languages. The application is totally design like flat user interface. This flat user interface is more attractive user interface in 2017. The application is gives more important to the system functionality. The application is to manage the student’s details, driver’s details, bus details, bus route details, bus fees details and more. The application has only one unit for admin. The admin can manage the entire application. The admin can login into the application by using username and password of the admin. The application is develop for big and small colleges. It is more user friendly for non-computer person. Even they can easily learn how to manage the application within hours. The application is more secure by the admin. The system will give an effective output for the VB.Net and SQL Server given as input to the system. The compiled java program given as input to the system, after scanning the program will generate different reports. The application generates the report for users. The admin can view and download the report of the data. The application deliver the excel format reports. Because, excel formatted reports is very easy to understand the income and expense of the college bus. This application is mainly develop for windows operating system users. In 2017, 73% of people enterprises are using windows operating system. So the application will easily install for all the windows operating system users. The application-developed size is very low. The application consumes very low space in disk. Therefore, the user can allocate very minimum local disk space for this application.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
How to grow GraphQL and remove SQLAlchemy and REST API from a high-load Python project - Pycon Belarus 2019
1. How to grow GraphQL and
remove SQLAlchemy and REST
API from a high-load Python
project
Oleksandr Tarasenko
EVO.company / prom.ua
2. Some of prom.ua numbers
● RPS 2500-3500
● total sites over 300 000
● products ~ 150 million
● pages ~ 400 million
2
3. What we had
● monolithic WSGI app (11 years)
● mako templates
● monolithic database
● monolithic Nginx
● poor REST API for all sub-services
● slow Delivery and Deployment
● new features were hard to develop
3
8. GraphQL concept in prom.ua
● new client-proposal paradigm
● good for read-only requests and data
● two-level (x-level) graph:
○ low-level graph for database mapping (data
loading)
○ high-level graph for business logic
● auto documentation and easy testing with
graphiql tool
● data validation 8
9. 9
Step 1. Mobile App API with GraphQL
Step 2. Separating Frontend from Backend
Step 3. Graph services as Proxy via different Graph APIs
Step 4. Replace SQLAlchemy models logic via Graph
Step 5. Mutations in Graph API
Step 6. A brave new world with GraphQL
10. Why we choose GraphQL
● good for read-only requests and data
● no mutations needed
● hard to update REST API versions (v1, v2,...vn)
● auto generated documentation
● new client-proposal paradigm
● difficult routes
10
12. from hiku.graph import Graph, Node, Link, Field, ...
from hiku.sources import sqlalchemy as sa
from hiku.types import Boolean, Integer, String, TypeRef, ...
product_query = sa.FieldsQuery('db.session', Product.__table__)
low_level_graph = Graph([
Node('Product', [
Field('id', Integer, product_query),
Field('name', String, product_query),
Field('price', None, product_query),
...
])
12
13. from hiku.graph import Graph, Node, Link, Field
from hiku.sources import sqlalchemy as sa
from hiku.types import Boolean, Integer, String, TypeRef
product_query = sa.FieldsQuery('db.session', Product.__table__)
low_level_graph = Graph([
Node('Product', [
Field('id', Integer, product_query),
Field('name', String, product_query),
Field('price', None, product_query),
...
])
13
14. from hiku.graph import Graph, Node, Link, Field
from hiku.sources import sqlalchemy as sa
from hiku.types import Boolean, Integer, String, TypeRef
product_query = sa.FieldsQuery('db.session', Product.__table__)
low_level_graph = Graph([
Node('Product', [
Field('id', Integer, product_query),
Field('name', String, product_query),
Field('price', None, product_query),
...
])
14
15. 15
Step 1. Mobile App API with GraphQL
Step 2. Separating Frontend from Backend
Step 3. Graph services as Proxy via different Graph APIs
Step 4. Replace SQLAlchemy models logic via Graph
Step 5. Mutations in Graph API
Step 6. A brave new world with GraphQL
16. 2017
● hiku upgrade to native GraphQL
● new site 2nd level graph
● reimplementing mobile sites
● SSR Node.js Apollo Client
● success story with metrics
16
26. Some of the numbers of the new scheme
● node.js workers 3-6 per front
● React render 5 ms
● prom.ua workers over 750
● number of requests split to node/python
26
27. 27
Step 1. Mobile App API with GraphQL
Step 2. Separating Frontend from Backend
Step 3. Graph services as Proxy via
different Graph APIs
Step 4. Replace SQLAlchemy models logic via Graph
Step 5. Mutations in Graph API
Step 6. A brave new world with GraphQL
28. Early 2018
● new order and shopping cart graphs
● new user cabinet
● Node.js and apollo for stitching two
graphs
● REST API under GraphQL
28
31. 31
Step 1. Mobile App API with GraphQL
Step 2. Separating Frontend from Backend
Step 3. Graph services as Proxy via different Graph APIs
Step 4. Replace SQLAlchemy models
logic via Graph
Step 5. Mutations in Graph API
Step 6. A brave new world with GraphQL
32. Middle 2018
● Hiku upgrade to aliases and new data types
● Use SSR + GraphQL for portal mobile version
● Graph for replace SQLAlchemy models logic
and queries
● Rewriting sites SQL queries to GraphQL
● Remove Models from BL
● https://hiku.readthedocs.io/
32
53. Mobile API average across all queries:
383 ms -> 323 ms 15%
Catalog Graph API average across all queries:
82 ms -> 62 ms 25%
Site Graph Api average across all queries
121 ms -> 108 ms 11%
Async + GraphQL results
56. A few facts of prom.ua graphs
● number of graphs: ~ 20
● number of fields: ~ 2000
● number of links: ~ 300
● number of nodes: ~ 250
● single entry point /graphql
● refactoring and new vision for code
● better monitoring
● easy to test API with graphiql
56
Hiku
57. 57
Step 1. Mobile App API with GraphQL
Step 2. Separating Frontend from Backend
Step 3. Graph services as Proxy via different Graph APIs
Step 4. Replace SQLAlchemy models logic via Graph
Step 5. Mutations in Graph API
Step 6. A brave new world with GraphQL
58. End of 2018 - now
● Hiku upgrade to mutations
● New 2nd level graph for opinions and
mobile cabinet API
● Read and write with graph
58
61. def add_new_comment_for_opinion(ctx, options):
opinion_id = options['opinion_id']
comment = options['comment']
user = ctx['user']
opinion = Opinion.get(opinion_id)
...
form = OpinionCommentForm()
if not form.validate():
return NewCommentResult(id=None, errors=form.validate_resp())
comment = opinion.new_comment(...)
comment.message = clear_text(form.data['comment'])
comment.author_user_id = user.id
db.session.commit()
return NewCommentResult(id=comment.id, errors=[])
62. def add_new_comment_for_opinion(ctx, options):
opinion_id = options['opinion_id']
comment = options['comment']
user = ctx['user']
opinion = Opinion.get(opinion_id)
...
form = OpinionCommentForm()
if not form.validate():
return NewCommentResult(id=None, errors=form.validate_resp())
comment = opinion.new_comment(...)
comment.message = clear_text(form.data['comment'])
comment.author_user_id = user.id
db.session.commit()
return NewCommentResult(id=comment.id, errors=[])
63. def add_new_comment_for_opinion(ctx, options):
opinion_id = options['opinion_id']
comment = options['comment']
user = ctx['user']
opinion = Opinion.get(opinion_id)
...
form = OpinionCommentForm()
if not form.validate():
return NewCommentResult(id=None, errors=form.validate_resp())
comment = opinion.new_comment(...)
comment.message = clear_text(form.data['comment'])
comment.author_user_id = user.id
db.session.commit()
return NewCommentResult(id=comment.id, errors=[])
64. def add_new_comment_for_opinion(ctx, options):
opinion_id = options['opinion_id']
comment = options['comment']
user = ctx['user']
opinion = Opinion.get(opinion_id)
...
form = OpinionCommentForm()
if not form.validate():
return NewCommentResult(id=None, errors=form.validate_resp())
comment = opinion.new_comment(...)
comment.message = clear_text(form.data['comment'])
comment.author_user_id = user.id
db.session.commit()
return NewCommentResult(id=comment.id, errors=[])
65. 65
Step 1. Mobile App API with GraphQL
Step 2. Separating Frontend from Backend
Step 3. Graph services as Proxy via different Graph APIs
Step 4. Replace SQLAlchemy models logic via Graph
Step 5. Mutations in Graph API
Step 6. A brave new world with GraphQL