├── .gitignore
├── Procfile
├── README.md
├── app.js
├── flutter-client
└── flutter_gql
│ ├── .gitignore
│ ├── .metadata
│ ├── README.md
│ ├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── flutter_gql
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
│ ├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ ├── lib
│ ├── main.dart
│ ├── screens
│ │ ├── add_user_page.dart
│ │ ├── details_page.dart
│ │ ├── home_screen.dart
│ │ ├── update_user_page.dart
│ │ └── users_page.dart
│ └── stylings
│ │ └── stylings.dart
│ ├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ └── MainMenu.xib
│ │ ├── Configs
│ │ ├── AppInfo.xcconfig
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ └── web
│ ├── favicon.png
│ ├── icons
│ ├── Icon-192.png
│ └── Icon-512.png
│ ├── index.html
│ └── manifest.json
├── package-lock.json
├── package.json
└── server
├── model
├── hobby.js
├── post.js
└── user.js
└── schema
├── schema.js
└── types_schema.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
2 |
3 | # Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,android,node
4 | # Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,android,node
5 |
6 | ### Android ###
7 | # Built application files
8 | *.apk
9 | *.aar
10 | *.ap_
11 | *.aab
12 |
13 | # Files for the ART/Dalvik VM
14 | *.dex
15 |
16 | # Java class files
17 | *.class
18 |
19 | # Generated files
20 | bin/
21 | gen/
22 | out/
23 | # Uncomment the following line in case you need and you don't have the release build type files in your app
24 | # release/
25 |
26 | # Gradle files
27 | .gradle/
28 | build/
29 |
30 | # Local configuration file (sdk path, etc)
31 | local.properties
32 |
33 | # Proguard folder generated by Eclipse
34 | proguard/
35 |
36 | # Log Files
37 | *.log
38 |
39 | # Android Studio Navigation editor temp files
40 | .navigation/
41 |
42 | # Android Studio captures folder
43 | captures/
44 |
45 | # IntelliJ
46 | *.iml
47 | .idea/workspace.xml
48 | .idea/tasks.xml
49 | .idea/gradle.xml
50 | .idea/assetWizardSettings.xml
51 | .idea/dictionaries
52 | .idea/libraries
53 | .idea/jarRepositories.xml
54 | # Android Studio 3 in .gitignore file.
55 | .idea/caches
56 | .idea/modules.xml
57 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you
58 | .idea/navEditor.xml
59 |
60 | # Keystore files
61 | # Uncomment the following lines if you do not want to check your keystore files in.
62 | #*.jks
63 | #*.keystore
64 |
65 | # External native build folder generated in Android Studio 2.2 and later
66 | .externalNativeBuild
67 | .cxx/
68 |
69 | # Google Services (e.g. APIs or Firebase)
70 | # google-services.json
71 |
72 | # Freeline
73 | freeline.py
74 | freeline/
75 | freeline_project_description.json
76 |
77 | # fastlane
78 | fastlane/report.xml
79 | fastlane/Preview.html
80 | fastlane/screenshots
81 | fastlane/test_output
82 | fastlane/readme.md
83 |
84 | # Version control
85 | vcs.xml
86 |
87 | # lint
88 | lint/intermediates/
89 | lint/generated/
90 | lint/outputs/
91 | lint/tmp/
92 | # lint/reports/
93 |
94 | # Android Profiling
95 | *.hprof
96 |
97 | ### Android Patch ###
98 | gen-external-apklibs
99 | output.json
100 |
101 | # Replacement of .externalNativeBuild directories introduced
102 | # with Android Studio 3.5.
103 |
104 | ### macOS ###
105 | # General
106 | .DS_Store
107 | .AppleDouble
108 | .LSOverride
109 |
110 | # Icon must end with two \r
111 | Icon
112 |
113 |
114 | # Thumbnails
115 | ._*
116 |
117 | # Files that might appear in the root of a volume
118 | .DocumentRevisions-V100
119 | .fseventsd
120 | .Spotlight-V100
121 | .TemporaryItems
122 | .Trashes
123 | .VolumeIcon.icns
124 | .com.apple.timemachine.donotpresent
125 |
126 | # Directories potentially created on remote AFP share
127 | .AppleDB
128 | .AppleDesktop
129 | Network Trash Folder
130 | Temporary Items
131 | .apdisk
132 |
133 | ### Node ###
134 | # Logs
135 | logs
136 | npm-debug.log*
137 | yarn-debug.log*
138 | yarn-error.log*
139 | lerna-debug.log*
140 | .pnpm-debug.log*
141 |
142 | # Diagnostic reports (https://nodejs.org/api/report.html)
143 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
144 |
145 | # Runtime data
146 | pids
147 | *.pid
148 | *.seed
149 | *.pid.lock
150 |
151 | # Directory for instrumented libs generated by jscoverage/JSCover
152 | lib-cov
153 |
154 | # Coverage directory used by tools like istanbul
155 | coverage
156 | *.lcov
157 |
158 | # nyc test coverage
159 | .nyc_output
160 |
161 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
162 | .grunt
163 |
164 | # Bower dependency directory (https://bower.io/)
165 | bower_components
166 |
167 | # node-waf configuration
168 | .lock-wscript
169 |
170 | # Compiled binary addons (https://nodejs.org/api/addons.html)
171 | build/Release
172 |
173 | # Dependency directories
174 | node_modules/
175 | jspm_packages/
176 |
177 | # Snowpack dependency directory (https://snowpack.dev/)
178 | web_modules/
179 |
180 | # TypeScript cache
181 | *.tsbuildinfo
182 |
183 | # Optional npm cache directory
184 | .npm
185 |
186 | # Optional eslint cache
187 | .eslintcache
188 |
189 | # Microbundle cache
190 | .rpt2_cache/
191 | .rts2_cache_cjs/
192 | .rts2_cache_es/
193 | .rts2_cache_umd/
194 |
195 | # Optional REPL history
196 | .node_repl_history
197 |
198 | # Output of 'npm pack'
199 | *.tgz
200 |
201 | # Yarn Integrity file
202 | .yarn-integrity
203 |
204 | # dotenv environment variables file
205 | .env
206 | .env.test
207 | .env.production
208 |
209 | # parcel-bundler cache (https://parceljs.org/)
210 | .cache
211 | .parcel-cache
212 |
213 | # Next.js build output
214 | .next
215 | out
216 |
217 | # Nuxt.js build / generate output
218 | .nuxt
219 | dist
220 |
221 | # Gatsby files
222 | .cache/
223 | # Comment in the public line in if your project uses Gatsby and not Next.js
224 | # https://nextjs.org/blog/next-9-1#public-directory-support
225 | # public
226 |
227 | # vuepress build output
228 | .vuepress/dist
229 |
230 | # Serverless directories
231 | .serverless/
232 |
233 | # FuseBox cache
234 | .fusebox/
235 |
236 | # DynamoDB Local files
237 | .dynamodb/
238 |
239 | # TernJS port file
240 | .tern-port
241 |
242 | # Stores VSCode versions used for testing VSCode extensions
243 | .vscode-test
244 |
245 | # yarn v2
246 | .yarn/cache
247 | .yarn/unplugged
248 | .yarn/build-state.yml
249 | .yarn/install-state.gz
250 | .pnp.*
251 |
252 | ### VisualStudioCode ###
253 | .vscode/*
254 | !.vscode/settings.json
255 | !.vscode/tasks.json
256 | !.vscode/launch.json
257 | !.vscode/extensions.json
258 | *.code-workspace
259 |
260 | # Local History for Visual Studio Code
261 | .history/
262 |
263 | ### VisualStudioCode Patch ###
264 | # Ignore all local history of files
265 | .history
266 | .ionide
267 |
268 | # End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,android,node
269 |
270 | # Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
271 |
272 | /nodemon.json
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: node app.js
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | In order to establish the connection to MongoDB Atlas, you'll need to
2 |
3 | 1. Go to: https://www.mongodb.com/ and open an account and create a cluster
4 | 2. In your project's root level, create a json file named nodemon.json.
5 |
6 | The contents of this file should be:
7 | ```
8 | {
9 | "env": {
10 | "mongoDatabase": "add_your_db_name" ,
11 | "mongoUserName": "add_your_username",
12 | "mongoUserPassword": "add_db_password"
13 |
14 | }
15 |
16 | }
17 | ```
18 |
19 | The nodemon.json file will contain your mongodb credentials.
20 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | var { graphqlHTTP } = require("express-graphql");
3 |
4 | const schema = require("./server/schema/schema");
5 | const testSchema = require("./server/schema/types_schema");
6 | const mongoose = require("mongoose");
7 |
8 | const app = express();
9 | const port = process.env.PORT || 4000;
10 | const cors = require("cors");
11 |
12 | app.use(cors());
13 | app.use(
14 | "/graphql",
15 | graphqlHTTP({
16 | graphiql: true,
17 | schema,
18 | })
19 | );
20 |
21 | mongoose
22 | .connect(
23 | `mongodb+srv://${process.env.mongoUserName}:${process.env.mongoUserPassword}@graphqlcluster.fpcxm.mongodb.net/${process.env.mongoDatabase}?retryWrites=true&w=majority
24 | `,
25 | { useNewUrlParser: true, useUnifiedTopology: true }
26 | )
27 | .then(() => {
28 | app.listen({ port: port }, () => {
29 | console.log(process.env.mongoUserName);
30 | //localhost:4000
31 | console.log("Listening for requests on my awesome port " + port);
32 | });
33 | })
34 | .catch((e) => {
35 | console.log(process.env.mongoUserName);
36 | return console.log("Error:::" + e);
37 | });
38 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: f4abaa0735eba4dfd8f33f73363911d63931fe03
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/README.md:
--------------------------------------------------------------------------------
1 | # flutter_gql
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 30
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | defaultConfig {
36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 | applicationId "com.example.flutter_gql"
38 | minSdkVersion 16
39 | targetSdkVersion 30
40 | versionCode flutterVersionCode.toInteger()
41 | versionName flutterVersionName
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
59 | }
60 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
13 |
17 |
21 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/kotlin/com/example/flutter_gql/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.flutter_gql
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/ephemeral/
22 | Flutter/app.flx
23 | Flutter/app.zip
24 | Flutter/flutter_assets/
25 | Flutter/flutter_export_environment.sh
26 | ServiceDefinitions.json
27 | Runner/GeneratedPluginRegistrant.*
28 |
29 | # Exceptions to above rules.
30 | !default.mode1v3
31 | !default.mode2v3
32 | !default.pbxuser
33 | !default.perspectivev3
34 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - connectivity_plus (0.0.1):
3 | - Flutter
4 | - Reachability
5 | - Flutter (1.0.0)
6 | - path_provider (0.0.1):
7 | - Flutter
8 | - Reachability (3.2)
9 |
10 | DEPENDENCIES:
11 | - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
12 | - Flutter (from `Flutter`)
13 | - path_provider (from `.symlinks/plugins/path_provider/ios`)
14 |
15 | SPEC REPOS:
16 | trunk:
17 | - Reachability
18 |
19 | EXTERNAL SOURCES:
20 | connectivity_plus:
21 | :path: ".symlinks/plugins/connectivity_plus/ios"
22 | Flutter:
23 | :path: Flutter
24 | path_provider:
25 | :path: ".symlinks/plugins/path_provider/ios"
26 |
27 | SPEC CHECKSUMS:
28 | connectivity_plus: 5f0eb61093bec56935f21a1699dd2758bc895587
29 | Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
30 | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
31 | Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
32 |
33 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
34 |
35 | COCOAPODS: 1.10.1
36 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 20DD42D23066419F333B41B6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8AF5DBEF89D5505EC9C1060E /* Pods_Runner.framework */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXCopyFilesBuildPhase section */
20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
21 | isa = PBXCopyFilesBuildPhase;
22 | buildActionMask = 2147483647;
23 | dstPath = "";
24 | dstSubfolderSpec = 10;
25 | files = (
26 | );
27 | name = "Embed Frameworks";
28 | runOnlyForDeploymentPostprocessing = 0;
29 | };
30 | /* End PBXCopyFilesBuildPhase section */
31 |
32 | /* Begin PBXFileReference section */
33 | 08CF97F3A08E48A704A7BE7F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
34 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
35 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
36 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
37 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
38 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
39 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
40 | 8AF5DBEF89D5505EC9C1060E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
42 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
43 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
44 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
45 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
46 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
47 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
48 | A0BAA39328DECFDA84C44A42 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
49 | A274F24657A9E77253E7B6CB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | 20DD42D23066419F333B41B6 /* Pods_Runner.framework in Frameworks */,
58 | );
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | /* End PBXFrameworksBuildPhase section */
62 |
63 | /* Begin PBXGroup section */
64 | 74CB68DA9221D1B0739FB759 /* Frameworks */ = {
65 | isa = PBXGroup;
66 | children = (
67 | 8AF5DBEF89D5505EC9C1060E /* Pods_Runner.framework */,
68 | );
69 | name = Frameworks;
70 | sourceTree = "";
71 | };
72 | 9740EEB11CF90186004384FC /* Flutter */ = {
73 | isa = PBXGroup;
74 | children = (
75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
76 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
77 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
78 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
79 | );
80 | name = Flutter;
81 | sourceTree = "";
82 | };
83 | 97C146E51CF9000F007C117D = {
84 | isa = PBXGroup;
85 | children = (
86 | 9740EEB11CF90186004384FC /* Flutter */,
87 | 97C146F01CF9000F007C117D /* Runner */,
88 | 97C146EF1CF9000F007C117D /* Products */,
89 | C081107D6115C62335055807 /* Pods */,
90 | 74CB68DA9221D1B0739FB759 /* Frameworks */,
91 | );
92 | sourceTree = "";
93 | };
94 | 97C146EF1CF9000F007C117D /* Products */ = {
95 | isa = PBXGroup;
96 | children = (
97 | 97C146EE1CF9000F007C117D /* Runner.app */,
98 | );
99 | name = Products;
100 | sourceTree = "";
101 | };
102 | 97C146F01CF9000F007C117D /* Runner */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
106 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
107 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
108 | 97C147021CF9000F007C117D /* Info.plist */,
109 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
110 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
111 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
112 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
113 | );
114 | path = Runner;
115 | sourceTree = "";
116 | };
117 | C081107D6115C62335055807 /* Pods */ = {
118 | isa = PBXGroup;
119 | children = (
120 | A0BAA39328DECFDA84C44A42 /* Pods-Runner.debug.xcconfig */,
121 | A274F24657A9E77253E7B6CB /* Pods-Runner.release.xcconfig */,
122 | 08CF97F3A08E48A704A7BE7F /* Pods-Runner.profile.xcconfig */,
123 | );
124 | name = Pods;
125 | path = Pods;
126 | sourceTree = "";
127 | };
128 | /* End PBXGroup section */
129 |
130 | /* Begin PBXNativeTarget section */
131 | 97C146ED1CF9000F007C117D /* Runner */ = {
132 | isa = PBXNativeTarget;
133 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
134 | buildPhases = (
135 | 8ADA49E272D28478F5CAE808 /* [CP] Check Pods Manifest.lock */,
136 | 9740EEB61CF901F6004384FC /* Run Script */,
137 | 97C146EA1CF9000F007C117D /* Sources */,
138 | 97C146EB1CF9000F007C117D /* Frameworks */,
139 | 97C146EC1CF9000F007C117D /* Resources */,
140 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142 | 16263262A315EA2CF84EBE89 /* [CP] Embed Pods Frameworks */,
143 | );
144 | buildRules = (
145 | );
146 | dependencies = (
147 | );
148 | name = Runner;
149 | productName = Runner;
150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
151 | productType = "com.apple.product-type.application";
152 | };
153 | /* End PBXNativeTarget section */
154 |
155 | /* Begin PBXProject section */
156 | 97C146E61CF9000F007C117D /* Project object */ = {
157 | isa = PBXProject;
158 | attributes = {
159 | LastUpgradeCheck = 1020;
160 | ORGANIZATIONNAME = "";
161 | TargetAttributes = {
162 | 97C146ED1CF9000F007C117D = {
163 | CreatedOnToolsVersion = 7.3.1;
164 | LastSwiftMigration = 1100;
165 | };
166 | };
167 | };
168 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
169 | compatibilityVersion = "Xcode 9.3";
170 | developmentRegion = en;
171 | hasScannedForEncodings = 0;
172 | knownRegions = (
173 | en,
174 | Base,
175 | );
176 | mainGroup = 97C146E51CF9000F007C117D;
177 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
178 | projectDirPath = "";
179 | projectRoot = "";
180 | targets = (
181 | 97C146ED1CF9000F007C117D /* Runner */,
182 | );
183 | };
184 | /* End PBXProject section */
185 |
186 | /* Begin PBXResourcesBuildPhase section */
187 | 97C146EC1CF9000F007C117D /* Resources */ = {
188 | isa = PBXResourcesBuildPhase;
189 | buildActionMask = 2147483647;
190 | files = (
191 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
193 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | };
198 | /* End PBXResourcesBuildPhase section */
199 |
200 | /* Begin PBXShellScriptBuildPhase section */
201 | 16263262A315EA2CF84EBE89 /* [CP] Embed Pods Frameworks */ = {
202 | isa = PBXShellScriptBuildPhase;
203 | buildActionMask = 2147483647;
204 | files = (
205 | );
206 | inputFileListPaths = (
207 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
208 | );
209 | name = "[CP] Embed Pods Frameworks";
210 | outputFileListPaths = (
211 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
212 | );
213 | runOnlyForDeploymentPostprocessing = 0;
214 | shellPath = /bin/sh;
215 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
216 | showEnvVarsInLog = 0;
217 | };
218 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
219 | isa = PBXShellScriptBuildPhase;
220 | buildActionMask = 2147483647;
221 | files = (
222 | );
223 | inputPaths = (
224 | );
225 | name = "Thin Binary";
226 | outputPaths = (
227 | );
228 | runOnlyForDeploymentPostprocessing = 0;
229 | shellPath = /bin/sh;
230 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
231 | };
232 | 8ADA49E272D28478F5CAE808 /* [CP] Check Pods Manifest.lock */ = {
233 | isa = PBXShellScriptBuildPhase;
234 | buildActionMask = 2147483647;
235 | files = (
236 | );
237 | inputFileListPaths = (
238 | );
239 | inputPaths = (
240 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
241 | "${PODS_ROOT}/Manifest.lock",
242 | );
243 | name = "[CP] Check Pods Manifest.lock";
244 | outputFileListPaths = (
245 | );
246 | outputPaths = (
247 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | shellPath = /bin/sh;
251 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
252 | showEnvVarsInLog = 0;
253 | };
254 | 9740EEB61CF901F6004384FC /* Run Script */ = {
255 | isa = PBXShellScriptBuildPhase;
256 | buildActionMask = 2147483647;
257 | files = (
258 | );
259 | inputPaths = (
260 | );
261 | name = "Run Script";
262 | outputPaths = (
263 | );
264 | runOnlyForDeploymentPostprocessing = 0;
265 | shellPath = /bin/sh;
266 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
267 | };
268 | /* End PBXShellScriptBuildPhase section */
269 |
270 | /* Begin PBXSourcesBuildPhase section */
271 | 97C146EA1CF9000F007C117D /* Sources */ = {
272 | isa = PBXSourcesBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
276 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
277 | );
278 | runOnlyForDeploymentPostprocessing = 0;
279 | };
280 | /* End PBXSourcesBuildPhase section */
281 |
282 | /* Begin PBXVariantGroup section */
283 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
284 | isa = PBXVariantGroup;
285 | children = (
286 | 97C146FB1CF9000F007C117D /* Base */,
287 | );
288 | name = Main.storyboard;
289 | sourceTree = "";
290 | };
291 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
292 | isa = PBXVariantGroup;
293 | children = (
294 | 97C147001CF9000F007C117D /* Base */,
295 | );
296 | name = LaunchScreen.storyboard;
297 | sourceTree = "";
298 | };
299 | /* End PBXVariantGroup section */
300 |
301 | /* Begin XCBuildConfiguration section */
302 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
303 | isa = XCBuildConfiguration;
304 | buildSettings = {
305 | ALWAYS_SEARCH_USER_PATHS = NO;
306 | CLANG_ANALYZER_NONNULL = YES;
307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
308 | CLANG_CXX_LIBRARY = "libc++";
309 | CLANG_ENABLE_MODULES = YES;
310 | CLANG_ENABLE_OBJC_ARC = YES;
311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
312 | CLANG_WARN_BOOL_CONVERSION = YES;
313 | CLANG_WARN_COMMA = YES;
314 | CLANG_WARN_CONSTANT_CONVERSION = YES;
315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
317 | CLANG_WARN_EMPTY_BODY = YES;
318 | CLANG_WARN_ENUM_CONVERSION = YES;
319 | CLANG_WARN_INFINITE_RECURSION = YES;
320 | CLANG_WARN_INT_CONVERSION = YES;
321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
326 | CLANG_WARN_STRICT_PROTOTYPES = YES;
327 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
328 | CLANG_WARN_UNREACHABLE_CODE = YES;
329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
331 | COPY_PHASE_STRIP = NO;
332 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
333 | ENABLE_NS_ASSERTIONS = NO;
334 | ENABLE_STRICT_OBJC_MSGSEND = YES;
335 | GCC_C_LANGUAGE_STANDARD = gnu99;
336 | GCC_NO_COMMON_BLOCKS = YES;
337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
339 | GCC_WARN_UNDECLARED_SELECTOR = YES;
340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341 | GCC_WARN_UNUSED_FUNCTION = YES;
342 | GCC_WARN_UNUSED_VARIABLE = YES;
343 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
344 | MTL_ENABLE_DEBUG_INFO = NO;
345 | SDKROOT = iphoneos;
346 | SUPPORTED_PLATFORMS = iphoneos;
347 | TARGETED_DEVICE_FAMILY = "1,2";
348 | VALIDATE_PRODUCT = YES;
349 | };
350 | name = Profile;
351 | };
352 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
353 | isa = XCBuildConfiguration;
354 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
355 | buildSettings = {
356 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
357 | CLANG_ENABLE_MODULES = YES;
358 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
359 | ENABLE_BITCODE = NO;
360 | INFOPLIST_FILE = Runner/Info.plist;
361 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
362 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterGql;
363 | PRODUCT_NAME = "$(TARGET_NAME)";
364 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
365 | SWIFT_VERSION = 5.0;
366 | VERSIONING_SYSTEM = "apple-generic";
367 | };
368 | name = Profile;
369 | };
370 | 97C147031CF9000F007C117D /* Debug */ = {
371 | isa = XCBuildConfiguration;
372 | buildSettings = {
373 | ALWAYS_SEARCH_USER_PATHS = NO;
374 | CLANG_ANALYZER_NONNULL = YES;
375 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
376 | CLANG_CXX_LIBRARY = "libc++";
377 | CLANG_ENABLE_MODULES = YES;
378 | CLANG_ENABLE_OBJC_ARC = YES;
379 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
380 | CLANG_WARN_BOOL_CONVERSION = YES;
381 | CLANG_WARN_COMMA = YES;
382 | CLANG_WARN_CONSTANT_CONVERSION = YES;
383 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
384 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
385 | CLANG_WARN_EMPTY_BODY = YES;
386 | CLANG_WARN_ENUM_CONVERSION = YES;
387 | CLANG_WARN_INFINITE_RECURSION = YES;
388 | CLANG_WARN_INT_CONVERSION = YES;
389 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
390 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
391 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
392 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
393 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
394 | CLANG_WARN_STRICT_PROTOTYPES = YES;
395 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
396 | CLANG_WARN_UNREACHABLE_CODE = YES;
397 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
398 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
399 | COPY_PHASE_STRIP = NO;
400 | DEBUG_INFORMATION_FORMAT = dwarf;
401 | ENABLE_STRICT_OBJC_MSGSEND = YES;
402 | ENABLE_TESTABILITY = YES;
403 | GCC_C_LANGUAGE_STANDARD = gnu99;
404 | GCC_DYNAMIC_NO_PIC = NO;
405 | GCC_NO_COMMON_BLOCKS = YES;
406 | GCC_OPTIMIZATION_LEVEL = 0;
407 | GCC_PREPROCESSOR_DEFINITIONS = (
408 | "DEBUG=1",
409 | "$(inherited)",
410 | );
411 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
412 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
413 | GCC_WARN_UNDECLARED_SELECTOR = YES;
414 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
415 | GCC_WARN_UNUSED_FUNCTION = YES;
416 | GCC_WARN_UNUSED_VARIABLE = YES;
417 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
418 | MTL_ENABLE_DEBUG_INFO = YES;
419 | ONLY_ACTIVE_ARCH = YES;
420 | SDKROOT = iphoneos;
421 | TARGETED_DEVICE_FAMILY = "1,2";
422 | };
423 | name = Debug;
424 | };
425 | 97C147041CF9000F007C117D /* Release */ = {
426 | isa = XCBuildConfiguration;
427 | buildSettings = {
428 | ALWAYS_SEARCH_USER_PATHS = NO;
429 | CLANG_ANALYZER_NONNULL = YES;
430 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
431 | CLANG_CXX_LIBRARY = "libc++";
432 | CLANG_ENABLE_MODULES = YES;
433 | CLANG_ENABLE_OBJC_ARC = YES;
434 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
435 | CLANG_WARN_BOOL_CONVERSION = YES;
436 | CLANG_WARN_COMMA = YES;
437 | CLANG_WARN_CONSTANT_CONVERSION = YES;
438 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
439 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
440 | CLANG_WARN_EMPTY_BODY = YES;
441 | CLANG_WARN_ENUM_CONVERSION = YES;
442 | CLANG_WARN_INFINITE_RECURSION = YES;
443 | CLANG_WARN_INT_CONVERSION = YES;
444 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
445 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
446 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
447 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
448 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
449 | CLANG_WARN_STRICT_PROTOTYPES = YES;
450 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
451 | CLANG_WARN_UNREACHABLE_CODE = YES;
452 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
453 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
454 | COPY_PHASE_STRIP = NO;
455 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
456 | ENABLE_NS_ASSERTIONS = NO;
457 | ENABLE_STRICT_OBJC_MSGSEND = YES;
458 | GCC_C_LANGUAGE_STANDARD = gnu99;
459 | GCC_NO_COMMON_BLOCKS = YES;
460 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
461 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
462 | GCC_WARN_UNDECLARED_SELECTOR = YES;
463 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
464 | GCC_WARN_UNUSED_FUNCTION = YES;
465 | GCC_WARN_UNUSED_VARIABLE = YES;
466 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
467 | MTL_ENABLE_DEBUG_INFO = NO;
468 | SDKROOT = iphoneos;
469 | SUPPORTED_PLATFORMS = iphoneos;
470 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
471 | TARGETED_DEVICE_FAMILY = "1,2";
472 | VALIDATE_PRODUCT = YES;
473 | };
474 | name = Release;
475 | };
476 | 97C147061CF9000F007C117D /* Debug */ = {
477 | isa = XCBuildConfiguration;
478 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
479 | buildSettings = {
480 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
481 | CLANG_ENABLE_MODULES = YES;
482 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
483 | ENABLE_BITCODE = NO;
484 | INFOPLIST_FILE = Runner/Info.plist;
485 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
486 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterGql;
487 | PRODUCT_NAME = "$(TARGET_NAME)";
488 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
489 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
490 | SWIFT_VERSION = 5.0;
491 | VERSIONING_SYSTEM = "apple-generic";
492 | };
493 | name = Debug;
494 | };
495 | 97C147071CF9000F007C117D /* Release */ = {
496 | isa = XCBuildConfiguration;
497 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
498 | buildSettings = {
499 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
500 | CLANG_ENABLE_MODULES = YES;
501 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
502 | ENABLE_BITCODE = NO;
503 | INFOPLIST_FILE = Runner/Info.plist;
504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
505 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterGql;
506 | PRODUCT_NAME = "$(TARGET_NAME)";
507 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
508 | SWIFT_VERSION = 5.0;
509 | VERSIONING_SYSTEM = "apple-generic";
510 | };
511 | name = Release;
512 | };
513 | /* End XCBuildConfiguration section */
514 |
515 | /* Begin XCConfigurationList section */
516 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
517 | isa = XCConfigurationList;
518 | buildConfigurations = (
519 | 97C147031CF9000F007C117D /* Debug */,
520 | 97C147041CF9000F007C117D /* Release */,
521 | 249021D3217E4FDB00AE95B9 /* Profile */,
522 | );
523 | defaultConfigurationIsVisible = 0;
524 | defaultConfigurationName = Release;
525 | };
526 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
527 | isa = XCConfigurationList;
528 | buildConfigurations = (
529 | 97C147061CF9000F007C117D /* Debug */,
530 | 97C147071CF9000F007C117D /* Release */,
531 | 249021D4217E4FDB00AE95B9 /* Profile */,
532 | );
533 | defaultConfigurationIsVisible = 0;
534 | defaultConfigurationName = Release;
535 | };
536 | /* End XCConfigurationList section */
537 | };
538 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
539 | }
540 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_gql
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_gql/screens/home_screen.dart';
3 | import 'package:graphql_flutter/graphql_flutter.dart';
4 |
5 | void main() async {
6 | WidgetsFlutterBinding.ensureInitialized();
7 | await initHiveForFlutter();
8 |
9 | final HttpLink link =
10 | HttpLink('https://graphql-flutter-course.herokuapp.com/graphql');
11 | ValueNotifier client = ValueNotifier(
12 | GraphQLClient(link: link, cache: GraphQLCache(store: HiveStore())));
13 |
14 | runApp(MyApp(client: client));
15 | }
16 |
17 | class MyApp extends StatelessWidget {
18 | final ValueNotifier client;
19 |
20 | const MyApp({Key? key, required this.client}) : super(key: key);
21 | @override
22 | Widget build(BuildContext context) {
23 | var theme = Theme.of(context).textTheme;
24 | return GraphQLProvider(
25 | client: client,
26 | child: CacheProvider(
27 | child: MaterialApp(
28 | debugShowCheckedModeBanner: false,
29 | title: 'Flutter Demo',
30 | theme: ThemeData(
31 | primarySwatch: Colors.blueGrey,
32 | visualDensity: VisualDensity.adaptivePlatformDensity,
33 | textTheme: theme,
34 | appBarTheme: AppBarTheme(
35 | iconTheme: IconThemeData(color: Colors.black87),
36 | textTheme: theme)),
37 | home: HomeScreen(),
38 | ),
39 | ),
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/lib/screens/add_user_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_gql/screens/home_screen.dart';
3 | import 'package:flutter_gql/stylings/stylings.dart';
4 | import 'package:graphql_flutter/graphql_flutter.dart';
5 |
6 | class AddUserPage extends StatefulWidget {
7 | const AddUserPage({Key? key}) : super(key: key);
8 |
9 | @override
10 | _AddUserPageState createState() => _AddUserPageState();
11 | }
12 |
13 | class _AddUserPageState extends State {
14 | final _formKey = GlobalKey();
15 | final _hobbyFormKey = GlobalKey();
16 | final _postFormKey = GlobalKey();
17 |
18 | final _nameController = TextEditingController();
19 | final _ageController = TextEditingController();
20 | final _professionController = TextEditingController();
21 | final _hobbyTitleController = TextEditingController();
22 | final _hobbyDescriptionController = TextEditingController();
23 | final _postController = TextEditingController();
24 |
25 | bool _isSaving = false;
26 |
27 | bool _visible = false;
28 |
29 | bool _isSavingHobby = false;
30 | bool _isSavingPost = false;
31 |
32 | var currUserId;
33 |
34 | void _toggle() {
35 | setState(() {
36 | _visible = !_visible;
37 | });
38 | }
39 |
40 | @override
41 | Widget build(BuildContext context) {
42 | return Scaffold(
43 | appBar: AppBar(
44 | title: Text(
45 | "Add a User",
46 | style: TextStyle(
47 | color: Colors.grey, fontSize: 19, fontWeight: FontWeight.bold),
48 | ),
49 | backgroundColor: Colors.lightGreen,
50 | elevation: 0,
51 | ),
52 | body: SingleChildScrollView(
53 | child: Container(
54 | padding: const EdgeInsets.all(24),
55 | margin: const EdgeInsets.symmetric(horizontal: 24, vertical: 6),
56 | decoration: BoxDecoration(
57 | color: Colors.white,
58 | borderRadius: BorderRadius.circular(16),
59 | boxShadow: [
60 | BoxShadow(
61 | offset: Offset(0, 10),
62 | color: Colors.grey.shade300,
63 | blurRadius: 30),
64 | ]),
65 | child: Column(
66 | children: [
67 | Mutation(
68 | options: MutationOptions(
69 | document: gql(insertUser()),
70 | fetchPolicy: FetchPolicy.noCache,
71 | onCompleted: (data) {
72 | setState(() {
73 | _isSaving = false;
74 | currUserId = data['CreateUser']["id"];
75 | });
76 | },
77 | ),
78 | builder: (runMutation, result) {
79 | return Form(
80 | key: _formKey,
81 | child: Column(
82 | children: [
83 | SizedBox(
84 | height: 12,
85 | ),
86 | TextFormField(
87 | controller: _nameController,
88 | decoration: InputDecoration(
89 | labelText: "Name",
90 | fillColor: Colors.white,
91 | border: OutlineInputBorder(
92 | borderSide: BorderSide())),
93 | validator: (value) {
94 | if (value!.length == 0) {
95 | return "Name cannot be empty";
96 | } else {
97 | return null;
98 | }
99 | },
100 | keyboardType: TextInputType.text),
101 | SizedBox(
102 | height: 12,
103 | ),
104 | TextFormField(
105 | controller: _professionController,
106 | decoration: InputDecoration(
107 | labelText: "Profession",
108 | fillColor: Colors.white,
109 | border: OutlineInputBorder(
110 | borderSide: BorderSide())),
111 | validator: (value) {
112 | if (value!.length == 0) {
113 | return "Profession cannot be empty";
114 | } else {
115 | return null;
116 | }
117 | },
118 | keyboardType: TextInputType.text),
119 | SizedBox(
120 | height: 12,
121 | ),
122 | TextFormField(
123 | controller: _ageController,
124 | decoration: InputDecoration(
125 | labelText: "Age",
126 | fillColor: Colors.white,
127 | border: OutlineInputBorder(
128 | borderSide: BorderSide())),
129 | validator: (value) {
130 | if (value!.length == 0) {
131 | return "Age cannot be empty";
132 | } else {
133 | return null;
134 | }
135 | },
136 | keyboardType: TextInputType.number),
137 | SizedBox(
138 | height: 12,
139 | ),
140 | _isSaving
141 | ? SizedBox(
142 | height: 20,
143 | width: 20,
144 | child: CircularProgressIndicator(
145 | strokeWidth: 3,
146 | ),
147 | )
148 | : TextButton(
149 | style: buildButtonStyle(),
150 | onPressed: () {
151 | if (_formKey.currentState!.validate()) {
152 | _toggle();
153 | setState(() {
154 | _isSaving = true;
155 | });
156 | runMutation({
157 | "name": _nameController.text.trim(),
158 | "profession":
159 | _professionController.text.trim(),
160 | "age":
161 | int.parse(_ageController.text.trim())
162 | });
163 | _nameController.clear();
164 | _professionController.clear();
165 | _ageController.clear();
166 | }
167 | },
168 | child: Padding(
169 | padding: const EdgeInsets.symmetric(
170 | horizontal: 36, vertical: 12),
171 | child: Text("Save")),
172 | )
173 | ],
174 | ),
175 | );
176 | },
177 | ),
178 |
179 | //Add Hobby
180 | Visibility(
181 | visible: _visible,
182 | child: Mutation(
183 | options: MutationOptions(
184 | document: gql(insertHobby()),
185 | fetchPolicy: FetchPolicy.noCache,
186 | onCompleted: (data) {
187 | setState(() {
188 | _isSavingHobby = false;
189 | });
190 | }),
191 | builder: (runMutation, result) {
192 | return Form(
193 | key: _hobbyFormKey,
194 | child: Column(
195 | children: [
196 | SizedBox(height: 12),
197 | TextFormField(
198 | controller: _hobbyTitleController,
199 | decoration: new InputDecoration(
200 | labelText: "Hobby title",
201 | fillColor: Colors.white,
202 | border: OutlineInputBorder(
203 | borderSide: BorderSide())),
204 | validator: (v) {
205 | if (v!.length == 0) {
206 | return "Enter a title";
207 | } else {
208 | return null;
209 | }
210 | },
211 | keyboardType: TextInputType.text,
212 | ),
213 | SizedBox(height: 12),
214 | TextFormField(
215 | controller: _hobbyDescriptionController,
216 | decoration: new InputDecoration(
217 | labelText: "Hobby description",
218 | fillColor: Colors.white,
219 | border: OutlineInputBorder(
220 | borderSide: BorderSide())),
221 | validator: (v) {
222 | if (v!.length == 0) {
223 | return "Description cannot be empty";
224 | } else {
225 | return null;
226 | }
227 | },
228 | keyboardType: TextInputType.text,
229 | ),
230 | SizedBox(height: 12),
231 | _isSavingHobby
232 | ? SizedBox(
233 | height: 20,
234 | width: 20,
235 | child: CircularProgressIndicator(
236 | strokeWidth: 3,
237 | ),
238 | )
239 | : TextButton(
240 | onPressed: () {
241 | if (_hobbyFormKey.currentState!
242 | .validate()) {
243 | setState(() {
244 | _isSavingHobby = true;
245 | });
246 | runMutation({
247 | 'title': _hobbyTitleController.text,
248 | 'description':
249 | _hobbyDescriptionController.text,
250 | 'userId': currUserId
251 | });
252 |
253 | _hobbyTitleController.clear();
254 | }
255 | _hobbyTitleController.clear();
256 | _hobbyDescriptionController.clear();
257 | },
258 | child: Padding(
259 | padding: const EdgeInsets.symmetric(
260 | horizontal: 36, vertical: 12),
261 | child: Text(
262 | "Save",
263 | style: TextStyle(
264 | color: Colors.grey, fontSize: 16),
265 | ),
266 | ),
267 | style: buildButtonStyle(),
268 | )
269 | ],
270 | ),
271 | );
272 | },
273 | )),
274 |
275 | // Save a Post
276 | Visibility(
277 | visible: _visible,
278 | child: Mutation(
279 | options: MutationOptions(
280 | document: gql(insertPost()),
281 | fetchPolicy: FetchPolicy.noCache,
282 | onCompleted: (data) {
283 | setState(() {
284 | _isSavingPost = false;
285 | });
286 | },
287 | ),
288 | builder: (runMutation, result) {
289 | return Form(
290 | key: _postFormKey,
291 | child: Column(
292 | children: [
293 | SizedBox(height: 12),
294 | TextFormField(
295 | controller: _postController,
296 | decoration: new InputDecoration(
297 | labelText: "Post Comment ",
298 | fillColor: Colors.white,
299 | border: OutlineInputBorder(
300 | borderSide: BorderSide())),
301 | validator: (v) {
302 | if (v!.length == 0) {
303 | return "Post cannot be empty";
304 | } else {
305 | return null;
306 | }
307 | },
308 | keyboardType: TextInputType.text,
309 | ),
310 | SizedBox(height: 12),
311 | _isSavingPost
312 | ? SizedBox(
313 | height: 20,
314 | width: 20,
315 | child: CircularProgressIndicator(
316 | strokeWidth: 3,
317 | ),
318 | )
319 | : TextButton(
320 | onPressed: () {
321 | if (_postFormKey.currentState!.validate()) {
322 | setState(() {
323 | _isSavingPost = true;
324 | });
325 | runMutation({
326 | 'comment': _postController.text,
327 | 'userId': currUserId
328 | });
329 | //clear fields
330 | _postController.clear();
331 | }
332 | },
333 | child: Padding(
334 | padding: const EdgeInsets.symmetric(
335 | horizontal: 36, vertical: 12),
336 | child: Text(
337 | "Save",
338 | style: TextStyle(
339 | color: Colors.grey, fontSize: 16),
340 | ),
341 | ),
342 | style: buildButtonStyle())
343 | ],
344 | ),
345 | );
346 | },
347 | ),
348 | ),
349 |
350 | Padding(
351 | padding: const EdgeInsets.all(18.0),
352 | child: Visibility(
353 | visible: _visible,
354 | child: TextButton(
355 | child: Padding(
356 | padding: const EdgeInsets.symmetric(
357 | horizontal: 26.0, vertical: 12.0),
358 | child: Text("Done",
359 | style: TextStyle(color: Colors.grey, fontSize: 16)),
360 | ),
361 | style: buildButtonStyle(),
362 | onPressed: () {
363 | Navigator.pushAndRemoveUntil(context, MaterialPageRoute(
364 | builder: (context) {
365 | return HomeScreen();
366 | },
367 | ), (route) => false);
368 | },
369 | )),
370 | )
371 | ],
372 | ),
373 | ),
374 | ),
375 | );
376 | }
377 | }
378 |
379 | String insertPost() {
380 | return """
381 | mutation CreatePost(\$comment: String!, \$userId: String!) {
382 | CreatePost(comment: \$comment, userId: \$userId){
383 | id
384 | comment
385 | }
386 | }
387 | """;
388 | }
389 |
390 | String insertUser() {
391 | return """
392 | mutation CreateUser(\$name: String!, \$age: Int!, \$profession: String!){
393 | CreateUser(name: \$name, age: \$age, profession: \$profession) {
394 | id
395 | name
396 | }
397 | }
398 | """;
399 | }
400 |
401 | String insertHobby() {
402 | return """
403 | mutation CreateHobby(\$title: String!, \$description: String!, \$userId: String!) {
404 | CreateHobby(title: \$title, description: \$description, userId: \$userId){
405 | id
406 | title
407 | }
408 | }
409 | """;
410 | }
411 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/lib/screens/details_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_gql/stylings/stylings.dart';
3 |
4 | class DetailsPage extends StatefulWidget {
5 | final dynamic user;
6 | const DetailsPage({Key? key, this.user}) : super(key: key);
7 |
8 | @override
9 | _DetailsPageState createState() => _DetailsPageState();
10 | }
11 |
12 | class _DetailsPageState extends State {
13 | List _hobbies = [];
14 | List _posts = [];
15 | bool _isHobby = false;
16 | bool _isPost = false;
17 |
18 | void _togglePostBtn() {
19 | setState(() {
20 | _isPost = true;
21 | _isHobby = false;
22 | });
23 | }
24 |
25 | void _toggleHobbyBtn() {
26 | setState(() {
27 | _isPost = false;
28 | _isHobby = true;
29 | });
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | return Scaffold(
35 | appBar: AppBar(
36 | backgroundColor: Colors.transparent,
37 | elevation: 0,
38 | title: Text(
39 | widget.user["name"],
40 | style: TextStyle(
41 | color: Colors.grey, fontSize: 19, fontWeight: FontWeight.bold),
42 | ),
43 | ),
44 | body: Column(
45 | children: [
46 | Flexible(
47 | flex: 1,
48 | fit: FlexFit.loose,
49 | child: Container(
50 | padding: const EdgeInsets.all(24),
51 | margin: const EdgeInsets.symmetric(horizontal: 24, vertical: 6),
52 | decoration: BoxDecoration(
53 | color: Colors.white,
54 | borderRadius: BorderRadius.circular(16),
55 | boxShadow: [
56 | BoxShadow(
57 | offset: Offset(0, 10),
58 | color: Colors.grey.shade300,
59 | blurRadius: 30)
60 | ]),
61 | child: Container(
62 | child: Column(
63 | crossAxisAlignment: CrossAxisAlignment.start,
64 | mainAxisSize: MainAxisSize.min,
65 | children: [
66 | Row(
67 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
68 | children: [
69 | Text(
70 | "${widget.user["name"].toUpperCase() ?? "N/A"}",
71 | style: TextStyle(
72 | fontSize: 16, fontWeight: FontWeight.bold),
73 | )
74 | ],
75 | ),
76 | Padding(
77 | padding: const EdgeInsets.only(left: 8.0, top: 8),
78 | child: Text(
79 | "Occupations: ${widget.user["profession"] ?? "N/A"}"),
80 | ),
81 | Padding(
82 | padding: const EdgeInsets.all(8.0),
83 | child: Text("Age: ${widget.user["age"] ?? "N/A"}"),
84 | )
85 | ],
86 | ),
87 | ),
88 | ),
89 | ),
90 | Row(
91 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
92 | children: [
93 | Flexible(
94 | flex: 1,
95 | fit: FlexFit.loose,
96 | child: TextButton(
97 | onPressed: () {
98 | _toggleHobbyBtn();
99 | //get all hobbies and show them
100 | setState(() {
101 | _hobbies = widget.user["hobbies"];
102 | });
103 | },
104 | style: buildButtonStyle(),
105 | child: Padding(
106 | padding: const EdgeInsets.symmetric(
107 | horizontal: 36, vertical: 12),
108 | child: Text(
109 | "Hobbies",
110 | style: TextStyle(color: Colors.grey, fontSize: 16),
111 | ),
112 | )),
113 | ),
114 | Flexible(
115 | child: TextButton(
116 | onPressed: () {
117 | _togglePostBtn();
118 | //get all hobbies and show them
119 | setState(() {
120 | _posts = widget.user["posts"];
121 | });
122 | },
123 | child: Padding(
124 | padding:
125 | const EdgeInsets.symmetric(horizontal: 36, vertical: 12),
126 | child: Text(
127 | "Posts",
128 | style: TextStyle(color: Colors.grey, fontSize: 16),
129 | ),
130 | ),
131 | style: buildButtonStyle(),
132 | ))
133 | ],
134 | ),
135 | //Listview
136 | Container(
137 | height: MediaQuery.of(context).size.height * 0.45,
138 | child: ListView.builder(
139 | itemCount: _isHobby ? _hobbies.length : _posts.length,
140 | itemBuilder: (context, index) {
141 | var data = _isHobby ? _hobbies[index] : _posts[index];
142 | return Stack(
143 | children: [
144 | Container(
145 | margin: const EdgeInsets.only(
146 | bottom: 23, left: 10, right: 10, top: 22),
147 | decoration: BoxDecoration(
148 | borderRadius: BorderRadius.circular(15),
149 | color: Colors.white,
150 | boxShadow: [
151 | BoxShadow(
152 | offset: Offset(0, 10),
153 | color: Colors.grey.shade300,
154 | blurRadius: 30)
155 | ]),
156 | padding: const EdgeInsets.all(20),
157 | child: Container(
158 | child: Column(
159 | crossAxisAlignment: CrossAxisAlignment.start,
160 | mainAxisSize: MainAxisSize.min,
161 | children: [
162 | Row(
163 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
164 | children: [
165 | Text(_isHobby
166 | ? "Hobby: ${data["title"]}"
167 | : "Post: ${data["comment"]}")
168 | ],
169 | ),
170 | Padding(
171 | padding: const EdgeInsets.only(left: 8.0, top: 8),
172 | child: Text(_isHobby
173 | ? "Description: ${data["description"]}"
174 | : ""),
175 | ),
176 | Padding(
177 | padding: const EdgeInsets.all(8.0),
178 | child: Text(
179 | "Author: ${widget.user["name"]}",
180 | style: TextStyle(fontStyle: FontStyle.italic),
181 | ),
182 | )
183 | ],
184 | ),
185 | ),
186 | )
187 | ],
188 | );
189 | },
190 | ),
191 | )
192 | ],
193 | ),
194 | );
195 | }
196 | }
197 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/lib/screens/home_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_gql/screens/add_user_page.dart';
3 | import 'package:flutter_gql/screens/users_page.dart';
4 |
5 | class HomeScreen extends StatefulWidget {
6 | const HomeScreen({Key? key}) : super(key: key);
7 |
8 | @override
9 | _HomeScreenState createState() => _HomeScreenState();
10 | }
11 |
12 | class _HomeScreenState extends State {
13 | @override
14 | Widget build(BuildContext context) {
15 | Widget content = UsersPage();
16 | return Scaffold(
17 | appBar: AppBar(
18 | title: Text(
19 | "Users & Hobbies",
20 | style: TextStyle(
21 | color: Colors.grey, fontSize: 19, fontWeight: FontWeight.bold),
22 | ),
23 | backgroundColor: Colors.transparent,
24 | elevation: 0,
25 | ),
26 |
27 | body: Center(child: content),
28 | floatingActionButton: FloatingActionButton(
29 | onPressed: () async {
30 | final route = MaterialPageRoute(
31 | builder: (context) => AddUserPage(),
32 | );
33 | await Navigator.push(context, route);
34 | },
35 | backgroundColor: Colors.lightGreen,
36 | child: Icon(Icons.group_add),
37 | ), // This trailing comma makes auto-formatting nicer for build methods.
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/lib/screens/update_user_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_gql/screens/home_screen.dart';
3 | import 'package:flutter_gql/stylings/stylings.dart';
4 | import 'package:graphql_flutter/graphql_flutter.dart';
5 |
6 | class UpdateUser extends StatefulWidget {
7 | final String id;
8 | final String name;
9 | final int age;
10 | final String profession;
11 |
12 | const UpdateUser(
13 | {Key? key,
14 | required this.id,
15 | required this.name,
16 | required this.age,
17 | required this.profession})
18 | : super(key: key);
19 |
20 | @override
21 | _UpdateUserState createState() => _UpdateUserState();
22 | }
23 |
24 | class _UpdateUserState extends State {
25 | final _nameController = TextEditingController();
26 | final _professionController = TextEditingController();
27 | final _ageController = TextEditingController();
28 | final _formKey = GlobalKey();
29 |
30 | bool _isSaving = false;
31 |
32 | @override
33 | void initState() {
34 | super.initState();
35 | _nameController.text = widget.name;
36 | _professionController.text = widget.profession;
37 | _ageController.text = widget.age.toString();
38 | }
39 |
40 | @override
41 | Widget build(BuildContext context) {
42 | return Scaffold(
43 | appBar: AppBar(
44 | backgroundColor: Colors.transparent,
45 | elevation: 0,
46 | title: Text(
47 | "Update ${widget.name}",
48 | style: TextStyle(
49 | color: Colors.grey, fontSize: 19, fontWeight: FontWeight.bold),
50 | ),
51 | ),
52 | body: SingleChildScrollView(
53 | child: Container(
54 | padding: const EdgeInsets.all(24),
55 | margin: const EdgeInsets.symmetric(horizontal: 24, vertical: 6),
56 | decoration: BoxDecoration(
57 | color: Colors.white,
58 | borderRadius: BorderRadius.circular(16),
59 | boxShadow: [
60 | BoxShadow(
61 | color: Colors.grey.shade300,
62 | offset: Offset(0, 10),
63 | blurRadius: 30)
64 | ]),
65 | child: Column(
66 | children: [
67 | Mutation(
68 | options: MutationOptions(
69 | document: gql(updateUser()),
70 | fetchPolicy: FetchPolicy.noCache,
71 | onCompleted: (data) {
72 | _isSaving = false;
73 |
74 | Navigator.pushAndRemoveUntil(context, MaterialPageRoute(
75 | builder: (context) {
76 | return HomeScreen();
77 | },
78 | ), (route) => false);
79 | },
80 | ),
81 | builder: (runMutation, result) {
82 | return Form(
83 | key: _formKey,
84 | child: Column(
85 | children: [
86 | SizedBox(height: 12),
87 | TextFormField(
88 | controller: _nameController,
89 | decoration: new InputDecoration(
90 | labelText: "Name",
91 | fillColor: Colors.white,
92 | border: OutlineInputBorder(
93 | borderSide: BorderSide())),
94 | validator: (v) {
95 | if (v!.length == 0) {
96 | return "Name cannot be empty";
97 | } else {
98 | return null;
99 | }
100 | },
101 | keyboardType: TextInputType.emailAddress,
102 | ),
103 | SizedBox(height: 12),
104 | TextFormField(
105 | controller: _professionController,
106 | decoration: new InputDecoration(
107 | labelText: "Profession",
108 | fillColor: Colors.white,
109 | border: OutlineInputBorder(
110 | borderSide: BorderSide())),
111 | validator: (v) {
112 | if (v!.length == 0) {
113 | return "Profession cannot be empty";
114 | } else {
115 | return null;
116 | }
117 | },
118 | keyboardType: TextInputType.emailAddress,
119 | ),
120 | SizedBox(height: 12),
121 | TextFormField(
122 | controller: _ageController,
123 | decoration: new InputDecoration(
124 | labelText: "Age",
125 | fillColor: Colors.white,
126 | border: OutlineInputBorder(
127 | borderSide: BorderSide())),
128 | validator: (v) {
129 | if (v!.length == 0) {
130 | return "Age cannot be empty";
131 | } else {
132 | return null;
133 | }
134 | },
135 | keyboardType: TextInputType.number,
136 | ),
137 | SizedBox(height: 12),
138 | _isSaving
139 | ? SizedBox(
140 | height: 20,
141 | width: 20,
142 | child: CircularProgressIndicator(
143 | strokeWidth: 3,
144 | ),
145 | )
146 | : TextButton(
147 | onPressed: () {
148 | if (_formKey.currentState!.validate()) {
149 | setState(() {
150 | _isSaving = true;
151 | });
152 | runMutation({
153 | 'id': widget.id,
154 | 'name': _nameController.text
155 | .toString()
156 | .trim(),
157 | 'profession':
158 | _professionController.text.trim(),
159 | 'age': int.parse(_ageController.text)
160 | });
161 | }
162 | },
163 | child: Padding(
164 | padding: const EdgeInsets.symmetric(
165 | horizontal: 36, vertical: 12),
166 | child: Text(
167 | "Update",
168 | style: TextStyle(
169 | color: Colors.grey, fontSize: 16),
170 | ),
171 | ),
172 | style: buildButtonStyle(),
173 | )
174 | ],
175 | ),
176 | );
177 | },
178 | )
179 | ],
180 | )),
181 | ),
182 | );
183 | }
184 | }
185 |
186 | String updateUser() {
187 | return """
188 | mutation UpdateUser(\$id: String!, \$name: String!, \$profession: String!, \$age: Int!) {
189 | UpdateUser(id: \$id, name: \$name, profession: \$profession, age: \$age){
190 |
191 | name
192 | }
193 | }
194 | """;
195 | }
196 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/lib/screens/users_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_gql/screens/details_page.dart';
3 | import 'package:flutter_gql/screens/home_screen.dart';
4 | import 'package:flutter_gql/screens/update_user_page.dart';
5 | import 'package:graphql_flutter/graphql_flutter.dart';
6 |
7 | class UsersPage extends StatefulWidget {
8 | const UsersPage({Key? key}) : super(key: key);
9 |
10 | @override
11 | _UsersPageState createState() => _UsersPageState();
12 | }
13 |
14 | class _UsersPageState extends State {
15 | List users = [];
16 | String _query = """
17 | query {
18 | users{
19 | name
20 | id
21 | profession
22 | age
23 | posts{
24 | id
25 | comment
26 | userId
27 | }
28 | hobbies{
29 | id
30 | title
31 | description
32 | userId
33 | }
34 | }
35 |
36 | }
37 |
38 | """;
39 |
40 | List hobbiesIDsToDelete = [];
41 | List postsIdsToDelete = [];
42 |
43 | bool _isRemoveHobby = false;
44 | bool _isRemovePost = false;
45 |
46 | @override
47 | Widget build(BuildContext context) {
48 | return Query(
49 | options: QueryOptions(document: gql(_query)),
50 | builder: (result, {fetchMore, refetch}) {
51 | if (result.isLoading) {
52 | return CircularProgressIndicator();
53 | }
54 | users = result.data!["users"];
55 |
56 | return (users.isNotEmpty)
57 | ? ListView.builder(
58 | itemCount: users.length,
59 | itemBuilder: (context, index) {
60 | final user = users[index];
61 |
62 | return Stack(
63 | children: [
64 | Container(
65 | margin:
66 | EdgeInsets.only(bottom: 23, left: 10, right: 10),
67 | decoration: BoxDecoration(
68 | color: Colors.white,
69 | borderRadius: BorderRadius.circular(15),
70 | boxShadow: [
71 | BoxShadow(
72 | offset: Offset(0, 10),
73 | color: Colors.grey.shade300,
74 | blurRadius: 30)
75 | ]),
76 | padding: const EdgeInsets.all(20),
77 | child: InkWell(
78 | onTap: () async {
79 | print(":::User: ${user.toString()}");
80 | final route = MaterialPageRoute(
81 | builder: (context) {
82 | return DetailsPage(user: user);
83 | },
84 | );
85 | await Navigator.push(context, route);
86 | },
87 | child: Container(
88 | child: Column(
89 | crossAxisAlignment: CrossAxisAlignment.start,
90 | mainAxisSize: MainAxisSize.min,
91 | children: [
92 | Row(
93 | mainAxisAlignment:
94 | MainAxisAlignment.spaceBetween,
95 | children: [
96 | Text("${user["name"]}",
97 | style: TextStyle(
98 | fontSize: 16,
99 | fontWeight: FontWeight.bold)),
100 | Row(
101 | children: [
102 | InkWell(
103 | child: Container(
104 | child: Icon(
105 | Icons.edit,
106 | color: Colors.greenAccent,
107 | ),
108 | ),
109 | onTap: () async {
110 | final route = MaterialPageRoute(
111 | builder: (context) {
112 | return UpdateUser(
113 | id: user["id"],
114 | name: user["name"],
115 | age: user["age"],
116 | profession:
117 | user["profession"]);
118 | },
119 | );
120 | await Navigator.push(
121 | context, route);
122 | },
123 | ),
124 | Mutation(
125 | options: MutationOptions(
126 | document: gql(removeUser()),
127 | onCompleted: (data) {},
128 | ),
129 | builder: (runMutation, result) {
130 | return Padding(
131 | padding: EdgeInsets.all(8),
132 | child: InkWell(
133 | child: Container(
134 | child: Icon(
135 | Icons.delete_forever,
136 | color: Colors.red,
137 | ),
138 | ),
139 | onTap: () async {
140 | hobbiesIDsToDelete.clear();
141 | postsIdsToDelete.clear();
142 |
143 | for (var i = 0;
144 | i <
145 | user["hobbies"]
146 | .length;
147 | i++) {
148 | hobbiesIDsToDelete.add(
149 | user["hobbies"][i]
150 | ["id"]);
151 | }
152 |
153 | for (var i = 0;
154 | i <
155 | user["posts"]
156 | .length;
157 | i++) {
158 | postsIdsToDelete.add(
159 | user["posts"][i]
160 | ["id"]);
161 | }
162 | // print(
163 | // "+++${user["name"]} Hobbies to delete: ${hobbiesIDsToDelete.toString()} ");
164 | // print(
165 | // "+++${user["name"]} Posts to delete: ${postsIdsToDelete.toString()}");
166 | setState(() {
167 | _isRemoveHobby = true;
168 | _isRemovePost = true;
169 | });
170 | runMutation(
171 | {"id": user["id"]});
172 | Navigator
173 | .pushAndRemoveUntil(
174 | context,
175 | MaterialPageRoute(
176 | builder: (context) {
177 | return HomeScreen();
178 | },
179 | ), (route) => false);
180 | },
181 | ),
182 | );
183 | },
184 | ),
185 | _isRemoveHobby
186 | ? Mutation(
187 | options: MutationOptions(
188 | document:
189 | gql(removeHobbies()),
190 | onCompleted: (data) {},
191 | ),
192 | builder:
193 | (runMutation, result) {
194 | if (hobbiesIDsToDelete
195 | .isNotEmpty) {
196 | print(
197 | "Calling deleteHobbies...");
198 | runMutation({
199 | 'ids':
200 | hobbiesIDsToDelete
201 | });
202 | }
203 | return Container();
204 | },
205 | )
206 | : Container(),
207 | _isRemovePost
208 | ? Mutation(
209 | options: MutationOptions(
210 | document:
211 | gql(removePosts()),
212 | onCompleted: (data) {},
213 | ),
214 | builder:
215 | (runMutation, result) {
216 | if (postsIdsToDelete
217 | .isNotEmpty) {
218 | runMutation({
219 | "ids": postsIdsToDelete
220 | });
221 | }
222 | return Container();
223 | },
224 | )
225 | : Container()
226 | ],
227 | )
228 | ],
229 | ),
230 | Padding(
231 | padding: const EdgeInsets.only(
232 | left: 8.0, top: 8.0),
233 | child: Text(
234 | "Occupation: ${user["profession"] ?? 'N/A'}"),
235 | ),
236 | Padding(
237 | padding: const EdgeInsets.only(
238 | left: 8.0, top: 8.0),
239 | child: Text("Age: ${user["age"] ?? 'N/A'}"),
240 | ),
241 | ],
242 | ),
243 | ),
244 | ),
245 | )
246 | ],
247 | );
248 | },
249 | )
250 | : Container(
251 | child: Center(
252 | child: Text("No items found"),
253 | ));
254 | });
255 | }
256 |
257 | String removeUser() {
258 | return """
259 | mutation RemoveUser(\$id: String!) {
260 | RemoveUser(id: \$id){
261 | name
262 | }
263 | }
264 | """;
265 | }
266 |
267 | String removePosts() {
268 | return """
269 | mutation RemovePosts(\$ids: [String]) {
270 | RemovePosts(ids: \$ids){
271 |
272 | }
273 | }
274 | """;
275 | }
276 |
277 | String removeHobbies() {
278 | return """
279 | mutation RemoveHobbies(\$ids: [String]) {
280 | RemoveHobbies(ids: \$ids){
281 |
282 | }
283 | }
284 | """;
285 | }
286 | }
287 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/lib/stylings/stylings.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | ButtonStyle buildButtonStyle() {
4 | return ButtonStyle(
5 | backgroundColor: MaterialStateProperty.all(Colors.greenAccent));
6 | }
7 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/xcuserdata/
7 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import connectivity_plus_macos
9 | import path_provider_macos
10 |
11 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
12 | ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
13 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
14 | }
15 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Podfile:
--------------------------------------------------------------------------------
1 | platform :osx, '10.11'
2 |
3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5 |
6 | project 'Runner', {
7 | 'Debug' => :debug,
8 | 'Profile' => :release,
9 | 'Release' => :release,
10 | }
11 |
12 | def flutter_root
13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14 | unless File.exist?(generated_xcode_build_settings_path)
15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16 | end
17 |
18 | File.foreach(generated_xcode_build_settings_path) do |line|
19 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
20 | return matches[1].strip if matches
21 | end
22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23 | end
24 |
25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26 |
27 | flutter_macos_podfile_setup
28 |
29 | target 'Runner' do
30 | use_frameworks!
31 | use_modular_headers!
32 |
33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34 | end
35 |
36 | post_install do |installer|
37 | installer.pods_project.targets.each do |target|
38 | flutter_additional_macos_build_settings(target)
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 51;
7 | objects = {
8 |
9 | /* Begin PBXAggregateTarget section */
10 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
11 | isa = PBXAggregateTarget;
12 | buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
13 | buildPhases = (
14 | 33CC111E2044C6BF0003C045 /* ShellScript */,
15 | );
16 | dependencies = (
17 | );
18 | name = "Flutter Assemble";
19 | productName = FLX;
20 | };
21 | /* End PBXAggregateTarget section */
22 |
23 | /* Begin PBXBuildFile section */
24 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
25 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
26 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
27 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
28 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXContainerItemProxy section */
32 | 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
33 | isa = PBXContainerItemProxy;
34 | containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
35 | proxyType = 1;
36 | remoteGlobalIDString = 33CC111A2044C6BA0003C045;
37 | remoteInfo = FLX;
38 | };
39 | /* End PBXContainerItemProxy section */
40 |
41 | /* Begin PBXCopyFilesBuildPhase section */
42 | 33CC110E2044A8840003C045 /* Bundle Framework */ = {
43 | isa = PBXCopyFilesBuildPhase;
44 | buildActionMask = 2147483647;
45 | dstPath = "";
46 | dstSubfolderSpec = 10;
47 | files = (
48 | );
49 | name = "Bundle Framework";
50 | runOnlyForDeploymentPostprocessing = 0;
51 | };
52 | /* End PBXCopyFilesBuildPhase section */
53 |
54 | /* Begin PBXFileReference section */
55 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
56 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; };
57 | 33CC10ED2044A3C60003C045 /* flutter_gql.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "flutter_gql.app"; sourceTree = BUILT_PRODUCTS_DIR; };
58 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
59 | 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; };
60 | 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
61 | 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; };
62 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; };
63 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; };
64 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; };
65 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; };
66 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; };
67 | 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; };
68 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; };
69 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
70 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
71 | /* End PBXFileReference section */
72 |
73 | /* Begin PBXFrameworksBuildPhase section */
74 | 33CC10EA2044A3C60003C045 /* Frameworks */ = {
75 | isa = PBXFrameworksBuildPhase;
76 | buildActionMask = 2147483647;
77 | files = (
78 | );
79 | runOnlyForDeploymentPostprocessing = 0;
80 | };
81 | /* End PBXFrameworksBuildPhase section */
82 |
83 | /* Begin PBXGroup section */
84 | 33BA886A226E78AF003329D5 /* Configs */ = {
85 | isa = PBXGroup;
86 | children = (
87 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */,
88 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
89 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
90 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
91 | );
92 | path = Configs;
93 | sourceTree = "";
94 | };
95 | 33CC10E42044A3C60003C045 = {
96 | isa = PBXGroup;
97 | children = (
98 | 33FAB671232836740065AC1E /* Runner */,
99 | 33CEB47122A05771004F2AC0 /* Flutter */,
100 | 33CC10EE2044A3C60003C045 /* Products */,
101 | D73912EC22F37F3D000D13A0 /* Frameworks */,
102 | );
103 | sourceTree = "";
104 | };
105 | 33CC10EE2044A3C60003C045 /* Products */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 33CC10ED2044A3C60003C045 /* flutter_gql.app */,
109 | );
110 | name = Products;
111 | sourceTree = "";
112 | };
113 | 33CC11242044D66E0003C045 /* Resources */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 33CC10F22044A3C60003C045 /* Assets.xcassets */,
117 | 33CC10F42044A3C60003C045 /* MainMenu.xib */,
118 | 33CC10F72044A3C60003C045 /* Info.plist */,
119 | );
120 | name = Resources;
121 | path = ..;
122 | sourceTree = "";
123 | };
124 | 33CEB47122A05771004F2AC0 /* Flutter */ = {
125 | isa = PBXGroup;
126 | children = (
127 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
128 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
129 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
130 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
131 | );
132 | path = Flutter;
133 | sourceTree = "";
134 | };
135 | 33FAB671232836740065AC1E /* Runner */ = {
136 | isa = PBXGroup;
137 | children = (
138 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */,
139 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
140 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */,
141 | 33E51914231749380026EE4D /* Release.entitlements */,
142 | 33CC11242044D66E0003C045 /* Resources */,
143 | 33BA886A226E78AF003329D5 /* Configs */,
144 | );
145 | path = Runner;
146 | sourceTree = "";
147 | };
148 | D73912EC22F37F3D000D13A0 /* Frameworks */ = {
149 | isa = PBXGroup;
150 | children = (
151 | );
152 | name = Frameworks;
153 | sourceTree = "";
154 | };
155 | /* End PBXGroup section */
156 |
157 | /* Begin PBXNativeTarget section */
158 | 33CC10EC2044A3C60003C045 /* Runner */ = {
159 | isa = PBXNativeTarget;
160 | buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
161 | buildPhases = (
162 | 33CC10E92044A3C60003C045 /* Sources */,
163 | 33CC10EA2044A3C60003C045 /* Frameworks */,
164 | 33CC10EB2044A3C60003C045 /* Resources */,
165 | 33CC110E2044A8840003C045 /* Bundle Framework */,
166 | 3399D490228B24CF009A79C7 /* ShellScript */,
167 | );
168 | buildRules = (
169 | );
170 | dependencies = (
171 | 33CC11202044C79F0003C045 /* PBXTargetDependency */,
172 | );
173 | name = Runner;
174 | productName = Runner;
175 | productReference = 33CC10ED2044A3C60003C045 /* flutter_gql.app */;
176 | productType = "com.apple.product-type.application";
177 | };
178 | /* End PBXNativeTarget section */
179 |
180 | /* Begin PBXProject section */
181 | 33CC10E52044A3C60003C045 /* Project object */ = {
182 | isa = PBXProject;
183 | attributes = {
184 | LastSwiftUpdateCheck = 0920;
185 | LastUpgradeCheck = 0930;
186 | ORGANIZATIONNAME = "";
187 | TargetAttributes = {
188 | 33CC10EC2044A3C60003C045 = {
189 | CreatedOnToolsVersion = 9.2;
190 | LastSwiftMigration = 1100;
191 | ProvisioningStyle = Automatic;
192 | SystemCapabilities = {
193 | com.apple.Sandbox = {
194 | enabled = 1;
195 | };
196 | };
197 | };
198 | 33CC111A2044C6BA0003C045 = {
199 | CreatedOnToolsVersion = 9.2;
200 | ProvisioningStyle = Manual;
201 | };
202 | };
203 | };
204 | buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
205 | compatibilityVersion = "Xcode 9.3";
206 | developmentRegion = en;
207 | hasScannedForEncodings = 0;
208 | knownRegions = (
209 | en,
210 | Base,
211 | );
212 | mainGroup = 33CC10E42044A3C60003C045;
213 | productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
214 | projectDirPath = "";
215 | projectRoot = "";
216 | targets = (
217 | 33CC10EC2044A3C60003C045 /* Runner */,
218 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */,
219 | );
220 | };
221 | /* End PBXProject section */
222 |
223 | /* Begin PBXResourcesBuildPhase section */
224 | 33CC10EB2044A3C60003C045 /* Resources */ = {
225 | isa = PBXResourcesBuildPhase;
226 | buildActionMask = 2147483647;
227 | files = (
228 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
229 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | };
233 | /* End PBXResourcesBuildPhase section */
234 |
235 | /* Begin PBXShellScriptBuildPhase section */
236 | 3399D490228B24CF009A79C7 /* ShellScript */ = {
237 | isa = PBXShellScriptBuildPhase;
238 | buildActionMask = 2147483647;
239 | files = (
240 | );
241 | inputFileListPaths = (
242 | );
243 | inputPaths = (
244 | );
245 | outputFileListPaths = (
246 | );
247 | outputPaths = (
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | shellPath = /bin/sh;
251 | shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
252 | };
253 | 33CC111E2044C6BF0003C045 /* ShellScript */ = {
254 | isa = PBXShellScriptBuildPhase;
255 | buildActionMask = 2147483647;
256 | files = (
257 | );
258 | inputFileListPaths = (
259 | Flutter/ephemeral/FlutterInputs.xcfilelist,
260 | );
261 | inputPaths = (
262 | Flutter/ephemeral/tripwire,
263 | );
264 | outputFileListPaths = (
265 | Flutter/ephemeral/FlutterOutputs.xcfilelist,
266 | );
267 | outputPaths = (
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | shellPath = /bin/sh;
271 | shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
272 | };
273 | /* End PBXShellScriptBuildPhase section */
274 |
275 | /* Begin PBXSourcesBuildPhase section */
276 | 33CC10E92044A3C60003C045 /* Sources */ = {
277 | isa = PBXSourcesBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
281 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
282 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
283 | );
284 | runOnlyForDeploymentPostprocessing = 0;
285 | };
286 | /* End PBXSourcesBuildPhase section */
287 |
288 | /* Begin PBXTargetDependency section */
289 | 33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
290 | isa = PBXTargetDependency;
291 | target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
292 | targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
293 | };
294 | /* End PBXTargetDependency section */
295 |
296 | /* Begin PBXVariantGroup section */
297 | 33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
298 | isa = PBXVariantGroup;
299 | children = (
300 | 33CC10F52044A3C60003C045 /* Base */,
301 | );
302 | name = MainMenu.xib;
303 | path = Runner;
304 | sourceTree = "";
305 | };
306 | /* End PBXVariantGroup section */
307 |
308 | /* Begin XCBuildConfiguration section */
309 | 338D0CE9231458BD00FA5F75 /* Profile */ = {
310 | isa = XCBuildConfiguration;
311 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
316 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
317 | CLANG_CXX_LIBRARY = "libc++";
318 | CLANG_ENABLE_MODULES = YES;
319 | CLANG_ENABLE_OBJC_ARC = YES;
320 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
321 | CLANG_WARN_BOOL_CONVERSION = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
326 | CLANG_WARN_EMPTY_BODY = YES;
327 | CLANG_WARN_ENUM_CONVERSION = YES;
328 | CLANG_WARN_INFINITE_RECURSION = YES;
329 | CLANG_WARN_INT_CONVERSION = YES;
330 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
335 | CODE_SIGN_IDENTITY = "-";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
338 | ENABLE_NS_ASSERTIONS = NO;
339 | ENABLE_STRICT_OBJC_MSGSEND = YES;
340 | GCC_C_LANGUAGE_STANDARD = gnu11;
341 | GCC_NO_COMMON_BLOCKS = YES;
342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
343 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
344 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
345 | GCC_WARN_UNUSED_FUNCTION = YES;
346 | GCC_WARN_UNUSED_VARIABLE = YES;
347 | MACOSX_DEPLOYMENT_TARGET = 10.11;
348 | MTL_ENABLE_DEBUG_INFO = NO;
349 | SDKROOT = macosx;
350 | SWIFT_COMPILATION_MODE = wholemodule;
351 | SWIFT_OPTIMIZATION_LEVEL = "-O";
352 | };
353 | name = Profile;
354 | };
355 | 338D0CEA231458BD00FA5F75 /* Profile */ = {
356 | isa = XCBuildConfiguration;
357 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
358 | buildSettings = {
359 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
360 | CLANG_ENABLE_MODULES = YES;
361 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
362 | CODE_SIGN_STYLE = Automatic;
363 | COMBINE_HIDPI_IMAGES = YES;
364 | INFOPLIST_FILE = Runner/Info.plist;
365 | LD_RUNPATH_SEARCH_PATHS = (
366 | "$(inherited)",
367 | "@executable_path/../Frameworks",
368 | );
369 | PROVISIONING_PROFILE_SPECIFIER = "";
370 | SWIFT_VERSION = 5.0;
371 | };
372 | name = Profile;
373 | };
374 | 338D0CEB231458BD00FA5F75 /* Profile */ = {
375 | isa = XCBuildConfiguration;
376 | buildSettings = {
377 | CODE_SIGN_STYLE = Manual;
378 | PRODUCT_NAME = "$(TARGET_NAME)";
379 | };
380 | name = Profile;
381 | };
382 | 33CC10F92044A3C60003C045 /* Debug */ = {
383 | isa = XCBuildConfiguration;
384 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
385 | buildSettings = {
386 | ALWAYS_SEARCH_USER_PATHS = NO;
387 | CLANG_ANALYZER_NONNULL = YES;
388 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
389 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
390 | CLANG_CXX_LIBRARY = "libc++";
391 | CLANG_ENABLE_MODULES = YES;
392 | CLANG_ENABLE_OBJC_ARC = YES;
393 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
394 | CLANG_WARN_BOOL_CONVERSION = YES;
395 | CLANG_WARN_CONSTANT_CONVERSION = YES;
396 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
397 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
398 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
399 | CLANG_WARN_EMPTY_BODY = YES;
400 | CLANG_WARN_ENUM_CONVERSION = YES;
401 | CLANG_WARN_INFINITE_RECURSION = YES;
402 | CLANG_WARN_INT_CONVERSION = YES;
403 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
404 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
405 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
406 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
407 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
408 | CODE_SIGN_IDENTITY = "-";
409 | COPY_PHASE_STRIP = NO;
410 | DEBUG_INFORMATION_FORMAT = dwarf;
411 | ENABLE_STRICT_OBJC_MSGSEND = YES;
412 | ENABLE_TESTABILITY = YES;
413 | GCC_C_LANGUAGE_STANDARD = gnu11;
414 | GCC_DYNAMIC_NO_PIC = NO;
415 | GCC_NO_COMMON_BLOCKS = YES;
416 | GCC_OPTIMIZATION_LEVEL = 0;
417 | GCC_PREPROCESSOR_DEFINITIONS = (
418 | "DEBUG=1",
419 | "$(inherited)",
420 | );
421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
424 | GCC_WARN_UNUSED_FUNCTION = YES;
425 | GCC_WARN_UNUSED_VARIABLE = YES;
426 | MACOSX_DEPLOYMENT_TARGET = 10.11;
427 | MTL_ENABLE_DEBUG_INFO = YES;
428 | ONLY_ACTIVE_ARCH = YES;
429 | SDKROOT = macosx;
430 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
431 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
432 | };
433 | name = Debug;
434 | };
435 | 33CC10FA2044A3C60003C045 /* Release */ = {
436 | isa = XCBuildConfiguration;
437 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
438 | buildSettings = {
439 | ALWAYS_SEARCH_USER_PATHS = NO;
440 | CLANG_ANALYZER_NONNULL = YES;
441 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
442 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
443 | CLANG_CXX_LIBRARY = "libc++";
444 | CLANG_ENABLE_MODULES = YES;
445 | CLANG_ENABLE_OBJC_ARC = YES;
446 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
447 | CLANG_WARN_BOOL_CONVERSION = YES;
448 | CLANG_WARN_CONSTANT_CONVERSION = YES;
449 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
450 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
451 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
452 | CLANG_WARN_EMPTY_BODY = YES;
453 | CLANG_WARN_ENUM_CONVERSION = YES;
454 | CLANG_WARN_INFINITE_RECURSION = YES;
455 | CLANG_WARN_INT_CONVERSION = YES;
456 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
457 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
458 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
459 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
460 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
461 | CODE_SIGN_IDENTITY = "-";
462 | COPY_PHASE_STRIP = NO;
463 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
464 | ENABLE_NS_ASSERTIONS = NO;
465 | ENABLE_STRICT_OBJC_MSGSEND = YES;
466 | GCC_C_LANGUAGE_STANDARD = gnu11;
467 | GCC_NO_COMMON_BLOCKS = YES;
468 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
469 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
470 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
471 | GCC_WARN_UNUSED_FUNCTION = YES;
472 | GCC_WARN_UNUSED_VARIABLE = YES;
473 | MACOSX_DEPLOYMENT_TARGET = 10.11;
474 | MTL_ENABLE_DEBUG_INFO = NO;
475 | SDKROOT = macosx;
476 | SWIFT_COMPILATION_MODE = wholemodule;
477 | SWIFT_OPTIMIZATION_LEVEL = "-O";
478 | };
479 | name = Release;
480 | };
481 | 33CC10FC2044A3C60003C045 /* Debug */ = {
482 | isa = XCBuildConfiguration;
483 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
484 | buildSettings = {
485 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
486 | CLANG_ENABLE_MODULES = YES;
487 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
488 | CODE_SIGN_STYLE = Automatic;
489 | COMBINE_HIDPI_IMAGES = YES;
490 | INFOPLIST_FILE = Runner/Info.plist;
491 | LD_RUNPATH_SEARCH_PATHS = (
492 | "$(inherited)",
493 | "@executable_path/../Frameworks",
494 | );
495 | PROVISIONING_PROFILE_SPECIFIER = "";
496 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
497 | SWIFT_VERSION = 5.0;
498 | };
499 | name = Debug;
500 | };
501 | 33CC10FD2044A3C60003C045 /* Release */ = {
502 | isa = XCBuildConfiguration;
503 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
504 | buildSettings = {
505 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
506 | CLANG_ENABLE_MODULES = YES;
507 | CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
508 | CODE_SIGN_STYLE = Automatic;
509 | COMBINE_HIDPI_IMAGES = YES;
510 | INFOPLIST_FILE = Runner/Info.plist;
511 | LD_RUNPATH_SEARCH_PATHS = (
512 | "$(inherited)",
513 | "@executable_path/../Frameworks",
514 | );
515 | PROVISIONING_PROFILE_SPECIFIER = "";
516 | SWIFT_VERSION = 5.0;
517 | };
518 | name = Release;
519 | };
520 | 33CC111C2044C6BA0003C045 /* Debug */ = {
521 | isa = XCBuildConfiguration;
522 | buildSettings = {
523 | CODE_SIGN_STYLE = Manual;
524 | PRODUCT_NAME = "$(TARGET_NAME)";
525 | };
526 | name = Debug;
527 | };
528 | 33CC111D2044C6BA0003C045 /* Release */ = {
529 | isa = XCBuildConfiguration;
530 | buildSettings = {
531 | CODE_SIGN_STYLE = Automatic;
532 | PRODUCT_NAME = "$(TARGET_NAME)";
533 | };
534 | name = Release;
535 | };
536 | /* End XCBuildConfiguration section */
537 |
538 | /* Begin XCConfigurationList section */
539 | 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
540 | isa = XCConfigurationList;
541 | buildConfigurations = (
542 | 33CC10F92044A3C60003C045 /* Debug */,
543 | 33CC10FA2044A3C60003C045 /* Release */,
544 | 338D0CE9231458BD00FA5F75 /* Profile */,
545 | );
546 | defaultConfigurationIsVisible = 0;
547 | defaultConfigurationName = Release;
548 | };
549 | 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
550 | isa = XCConfigurationList;
551 | buildConfigurations = (
552 | 33CC10FC2044A3C60003C045 /* Debug */,
553 | 33CC10FD2044A3C60003C045 /* Release */,
554 | 338D0CEA231458BD00FA5F75 /* Profile */,
555 | );
556 | defaultConfigurationIsVisible = 0;
557 | defaultConfigurationName = Release;
558 | };
559 | 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
560 | isa = XCConfigurationList;
561 | buildConfigurations = (
562 | 33CC111C2044C6BA0003C045 /* Debug */,
563 | 33CC111D2044C6BA0003C045 /* Release */,
564 | 338D0CEB231458BD00FA5F75 /* Profile */,
565 | );
566 | defaultConfigurationIsVisible = 0;
567 | defaultConfigurationName = Release;
568 | };
569 | /* End XCConfigurationList section */
570 | };
571 | rootObject = 33CC10E52044A3C60003C045 /* Project object */;
572 | }
573 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
64 |
65 |
71 |
73 |
79 |
80 |
81 |
82 |
84 |
85 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = flutter_gql
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterGql
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | args:
5 | dependency: transitive
6 | description:
7 | name: args
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.2.0"
11 | async:
12 | dependency: transitive
13 | description:
14 | name: async
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.6.1"
18 | boolean_selector:
19 | dependency: transitive
20 | description:
21 | name: boolean_selector
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.1.0"
25 | characters:
26 | dependency: transitive
27 | description:
28 | name: characters
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.1.0"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.2.0"
39 | clock:
40 | dependency: transitive
41 | description:
42 | name: clock
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.1.0"
46 | collection:
47 | dependency: transitive
48 | description:
49 | name: collection
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.15.0"
53 | connectivity_plus:
54 | dependency: transitive
55 | description:
56 | name: connectivity_plus
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.1.0"
60 | connectivity_plus_linux:
61 | dependency: transitive
62 | description:
63 | name: connectivity_plus_linux
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.1.0"
67 | connectivity_plus_macos:
68 | dependency: transitive
69 | description:
70 | name: connectivity_plus_macos
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "1.1.0"
74 | connectivity_plus_platform_interface:
75 | dependency: transitive
76 | description:
77 | name: connectivity_plus_platform_interface
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "1.1.0"
81 | connectivity_plus_web:
82 | dependency: transitive
83 | description:
84 | name: connectivity_plus_web
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "1.1.0+1"
88 | connectivity_plus_windows:
89 | dependency: transitive
90 | description:
91 | name: connectivity_plus_windows
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "1.1.0"
95 | crypto:
96 | dependency: transitive
97 | description:
98 | name: crypto
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "3.0.1"
102 | cupertino_icons:
103 | dependency: "direct main"
104 | description:
105 | name: cupertino_icons
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "1.0.3"
109 | dbus:
110 | dependency: transitive
111 | description:
112 | name: dbus
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "0.5.6"
116 | fake_async:
117 | dependency: transitive
118 | description:
119 | name: fake_async
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "1.2.0"
123 | ffi:
124 | dependency: transitive
125 | description:
126 | name: ffi
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "1.1.2"
130 | file:
131 | dependency: transitive
132 | description:
133 | name: file
134 | url: "https://pub.dartlang.org"
135 | source: hosted
136 | version: "6.1.2"
137 | flutter:
138 | dependency: "direct main"
139 | description: flutter
140 | source: sdk
141 | version: "0.0.0"
142 | flutter_test:
143 | dependency: "direct dev"
144 | description: flutter
145 | source: sdk
146 | version: "0.0.0"
147 | flutter_web_plugins:
148 | dependency: transitive
149 | description: flutter
150 | source: sdk
151 | version: "0.0.0"
152 | gql:
153 | dependency: transitive
154 | description:
155 | name: gql
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "0.13.0"
159 | gql_dedupe_link:
160 | dependency: transitive
161 | description:
162 | name: gql_dedupe_link
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "2.0.0"
166 | gql_error_link:
167 | dependency: transitive
168 | description:
169 | name: gql_error_link
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "0.2.0"
173 | gql_exec:
174 | dependency: transitive
175 | description:
176 | name: gql_exec
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "0.3.0"
180 | gql_http_link:
181 | dependency: transitive
182 | description:
183 | name: gql_http_link
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "0.4.0"
187 | gql_link:
188 | dependency: transitive
189 | description:
190 | name: gql_link
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "0.4.0"
194 | gql_transform_link:
195 | dependency: transitive
196 | description:
197 | name: gql_transform_link
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "0.2.0"
201 | graphql:
202 | dependency: transitive
203 | description:
204 | name: graphql
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "5.0.0"
208 | graphql_flutter:
209 | dependency: "direct main"
210 | description:
211 | name: graphql_flutter
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "5.0.0"
215 | hive:
216 | dependency: transitive
217 | description:
218 | name: hive
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "2.0.4"
222 | http:
223 | dependency: transitive
224 | description:
225 | name: http
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "0.13.3"
229 | http_parser:
230 | dependency: transitive
231 | description:
232 | name: http_parser
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "4.0.0"
236 | js:
237 | dependency: transitive
238 | description:
239 | name: js
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "0.6.3"
243 | matcher:
244 | dependency: transitive
245 | description:
246 | name: matcher
247 | url: "https://pub.dartlang.org"
248 | source: hosted
249 | version: "0.12.10"
250 | meta:
251 | dependency: transitive
252 | description:
253 | name: meta
254 | url: "https://pub.dartlang.org"
255 | source: hosted
256 | version: "1.3.0"
257 | nm:
258 | dependency: transitive
259 | description:
260 | name: nm
261 | url: "https://pub.dartlang.org"
262 | source: hosted
263 | version: "0.3.0"
264 | normalize:
265 | dependency: transitive
266 | description:
267 | name: normalize
268 | url: "https://pub.dartlang.org"
269 | source: hosted
270 | version: "0.5.5"
271 | path:
272 | dependency: transitive
273 | description:
274 | name: path
275 | url: "https://pub.dartlang.org"
276 | source: hosted
277 | version: "1.8.0"
278 | path_provider:
279 | dependency: transitive
280 | description:
281 | name: path_provider
282 | url: "https://pub.dartlang.org"
283 | source: hosted
284 | version: "2.0.2"
285 | path_provider_linux:
286 | dependency: transitive
287 | description:
288 | name: path_provider_linux
289 | url: "https://pub.dartlang.org"
290 | source: hosted
291 | version: "2.0.2"
292 | path_provider_macos:
293 | dependency: transitive
294 | description:
295 | name: path_provider_macos
296 | url: "https://pub.dartlang.org"
297 | source: hosted
298 | version: "2.0.2"
299 | path_provider_platform_interface:
300 | dependency: transitive
301 | description:
302 | name: path_provider_platform_interface
303 | url: "https://pub.dartlang.org"
304 | source: hosted
305 | version: "2.0.1"
306 | path_provider_windows:
307 | dependency: transitive
308 | description:
309 | name: path_provider_windows
310 | url: "https://pub.dartlang.org"
311 | source: hosted
312 | version: "2.0.3"
313 | pedantic:
314 | dependency: transitive
315 | description:
316 | name: pedantic
317 | url: "https://pub.dartlang.org"
318 | source: hosted
319 | version: "1.11.1"
320 | petitparser:
321 | dependency: transitive
322 | description:
323 | name: petitparser
324 | url: "https://pub.dartlang.org"
325 | source: hosted
326 | version: "4.1.0"
327 | platform:
328 | dependency: transitive
329 | description:
330 | name: platform
331 | url: "https://pub.dartlang.org"
332 | source: hosted
333 | version: "3.0.2"
334 | plugin_platform_interface:
335 | dependency: transitive
336 | description:
337 | name: plugin_platform_interface
338 | url: "https://pub.dartlang.org"
339 | source: hosted
340 | version: "2.0.1"
341 | process:
342 | dependency: transitive
343 | description:
344 | name: process
345 | url: "https://pub.dartlang.org"
346 | source: hosted
347 | version: "4.2.3"
348 | rxdart:
349 | dependency: transitive
350 | description:
351 | name: rxdart
352 | url: "https://pub.dartlang.org"
353 | source: hosted
354 | version: "0.26.0"
355 | sky_engine:
356 | dependency: transitive
357 | description: flutter
358 | source: sdk
359 | version: "0.0.99"
360 | source_span:
361 | dependency: transitive
362 | description:
363 | name: source_span
364 | url: "https://pub.dartlang.org"
365 | source: hosted
366 | version: "1.8.1"
367 | stack_trace:
368 | dependency: transitive
369 | description:
370 | name: stack_trace
371 | url: "https://pub.dartlang.org"
372 | source: hosted
373 | version: "1.10.0"
374 | stream_channel:
375 | dependency: transitive
376 | description:
377 | name: stream_channel
378 | url: "https://pub.dartlang.org"
379 | source: hosted
380 | version: "2.1.0"
381 | string_scanner:
382 | dependency: transitive
383 | description:
384 | name: string_scanner
385 | url: "https://pub.dartlang.org"
386 | source: hosted
387 | version: "1.1.0"
388 | term_glyph:
389 | dependency: transitive
390 | description:
391 | name: term_glyph
392 | url: "https://pub.dartlang.org"
393 | source: hosted
394 | version: "1.2.0"
395 | test_api:
396 | dependency: transitive
397 | description:
398 | name: test_api
399 | url: "https://pub.dartlang.org"
400 | source: hosted
401 | version: "0.3.0"
402 | typed_data:
403 | dependency: transitive
404 | description:
405 | name: typed_data
406 | url: "https://pub.dartlang.org"
407 | source: hosted
408 | version: "1.3.0"
409 | uuid:
410 | dependency: transitive
411 | description:
412 | name: uuid
413 | url: "https://pub.dartlang.org"
414 | source: hosted
415 | version: "3.0.4"
416 | vector_math:
417 | dependency: transitive
418 | description:
419 | name: vector_math
420 | url: "https://pub.dartlang.org"
421 | source: hosted
422 | version: "2.1.0"
423 | web_socket_channel:
424 | dependency: transitive
425 | description:
426 | name: web_socket_channel
427 | url: "https://pub.dartlang.org"
428 | source: hosted
429 | version: "2.1.0"
430 | win32:
431 | dependency: transitive
432 | description:
433 | name: win32
434 | url: "https://pub.dartlang.org"
435 | source: hosted
436 | version: "2.2.7"
437 | xdg_directories:
438 | dependency: transitive
439 | description:
440 | name: xdg_directories
441 | url: "https://pub.dartlang.org"
442 | source: hosted
443 | version: "0.2.0"
444 | xml:
445 | dependency: transitive
446 | description:
447 | name: xml
448 | url: "https://pub.dartlang.org"
449 | source: hosted
450 | version: "5.1.2"
451 | sdks:
452 | dart: ">=2.13.0 <3.0.0"
453 | flutter: ">=2.0.0"
454 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_gql
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: "none" # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: ">=2.12.0 <3.0.0"
22 |
23 | dependencies:
24 | cupertino_icons: ^1.0.2
25 | flutter:
26 | sdk: flutter
27 | graphql_flutter: ^5.0.0
28 |
29 | dev_dependencies:
30 | flutter_test:
31 | sdk: flutter
32 |
33 | # For information on the generic Dart part of this file, see the
34 | # following page: https://dart.dev/tools/pub/pubspec
35 | # The following section is specific to Flutter.
36 | flutter:
37 | # The following line ensures that the Material Icons font is
38 | # included with your application, so that you can use the icons in
39 | # the material Icons class.
40 | uses-material-design: true
41 | # To add assets to your application, add an assets section, like this:
42 | # assets:
43 | # - images/a_dot_burr.jpeg
44 | # - images/a_dot_ham.jpeg
45 | # An image asset can refer to one or more resolution-specific "variants", see
46 | # https://flutter.dev/assets-and-images/#resolution-aware.
47 | # For details regarding adding assets from package dependencies, see
48 | # https://flutter.dev/assets-and-images/#from-packages
49 | # To add custom fonts to your application, add a fonts section here,
50 | # in this "flutter" section. Each entry in this list should have a
51 | # "family" key with the font family name, and a "fonts" key with a
52 | # list giving the asset and other descriptors for the font. For
53 | # example:
54 | # fonts:
55 | # - family: Schyler
56 | # fonts:
57 | # - asset: fonts/Schyler-Regular.ttf
58 | # - asset: fonts/Schyler-Italic.ttf
59 | # style: italic
60 | # - family: Trajan Pro
61 | # fonts:
62 | # - asset: fonts/TrajanPro.ttf
63 | # - asset: fonts/TrajanPro_Bold.ttf
64 | # weight: 700
65 | #
66 | # For details regarding fonts from package dependencies,
67 | # see https://flutter.dev/custom-fonts/#from-packages
68 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/web/favicon.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/flutter-graphql-course/94d8ae15d07db4dc238a80ccf52f06837be4718e/flutter-client/flutter_gql/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | flutter_gql
27 |
28 |
29 |
30 |
33 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/flutter-client/flutter_gql/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "flutter_gql",
3 | "short_name": "flutter_gql",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "graphql-project",
3 | "version": "1.0.0",
4 | "description": "graphql-flutter",
5 | "main": "app.js",
6 |
7 | "author": "Paulo",
8 | "license": "ISC",
9 | "dependencies": {
10 | "cors": "^2.8.5",
11 | "express": "^4.17.1",
12 | "express-graphql": "^0.12.0",
13 | "graphql": "^15.5.1",
14 | "lodash": "^4.17.21",
15 | "mongoose": "^6.0.1",
16 | "nodemon": "^2.0.12"
17 | },
18 | "scripts": {
19 | "start": "node app.js"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/server/model/hobby.js:
--------------------------------------------------------------------------------
1 | const mongoose = require("mongoose");
2 | const MSchema = mongoose.Schema;
3 |
4 | const hobbySchema = MSchema({
5 | title: String,
6 | description: String,
7 | userId: String,
8 | });
9 | module.exports = mongoose.model("Hobby", hobbySchema);
10 |
--------------------------------------------------------------------------------
/server/model/post.js:
--------------------------------------------------------------------------------
1 | const mongoose = require("mongoose");
2 | const MSchema = mongoose.Schema;
3 |
4 | const postSchema = MSchema({
5 | comment: String,
6 | userId: String,
7 | });
8 |
9 | module.exports = mongoose.model("Post", postSchema);
10 |
--------------------------------------------------------------------------------
/server/model/user.js:
--------------------------------------------------------------------------------
1 | const mongoose = require("mongoose");
2 | const MSchema = mongoose.Schema;
3 |
4 | const userSchema = MSchema({
5 | name: String,
6 | age: Number,
7 | profession: String,
8 | });
9 | module.exports = mongoose.model("User", userSchema);
10 |
--------------------------------------------------------------------------------
/server/schema/schema.js:
--------------------------------------------------------------------------------
1 | const graphql = require("graphql");
2 | var _ = require("lodash");
3 | const User = require("../model/user");
4 | const Hobby = require("../model/hobby");
5 | const Post = require("../model/post");
6 | const { remove } = require("../model/user");
7 |
8 | //dummy data
9 | // var usersData = [
10 | // { id: "1", name: "Bond", age: 36, profession: "Programmer" },
11 | // { id: "13", name: "Anna", age: 26, profession: "Baker" },
12 | // { id: "211", name: "Bella", age: 16, profession: "Mechanic" },
13 | // { id: "19", name: "Gina", age: 26, profession: "Painter" },
14 | // { id: "150", name: "Georgina", age: 36, profession: "Teacher" },
15 | // ];
16 |
17 | // var hobbiesData = [
18 | // {
19 | // id: "1",
20 | // title: "Programming",
21 | // description: "Using computers to make the world a better place",
22 | // userId: "150",
23 | // },
24 | // {
25 | // id: "2",
26 | // title: "Rowing",
27 | // description: "Sweat and feel better before eating donouts",
28 | // userId: "211",
29 | // },
30 | // {
31 | // id: "3",
32 | // title: "Swimming",
33 | // description: "Get in the water and learn to become the water",
34 | // userId: "211",
35 | // },
36 | // {
37 | // id: "4",
38 | // title: "Fencing",
39 | // description: "A hobby for fency people",
40 | // userId: "13",
41 | // },
42 | // {
43 | // id: "5",
44 | // title: "Hiking",
45 | // description: "Wear hiking boots and explore the world",
46 | // userId: "150",
47 | // },
48 | // ];
49 |
50 | // var postsData = [
51 | // { id: "1", comment: "Building a Mind", userId: "1" },
52 | // { id: "2", comment: "GraphQL is Amazing", userId: "1" },
53 | // { id: "3", comment: "How to Change the World", userId: "19" },
54 | // { id: "4", comment: "How to Change the World", userId: "211" },
55 | // { id: "5", comment: "How to Change the World", userId: "1" },
56 | // ];
57 |
58 | const {
59 | GraphQLObjectType,
60 | GraphQLID,
61 | GraphQLString,
62 | GraphQLInt,
63 | GraphQLSchema,
64 | GraphQLList,
65 | GraphQLNonNull,
66 | } = graphql;
67 |
68 | //Create types
69 | const UserType = new GraphQLObjectType({
70 | name: "User",
71 | description: "Documentation for user...",
72 | fields: () => ({
73 | id: { type: GraphQLID },
74 | name: { type: GraphQLString },
75 | age: { type: GraphQLInt },
76 | profession: { type: GraphQLString },
77 |
78 | posts: {
79 | type: new GraphQLList(PostType),
80 | resolve(parent, args) {
81 | return Post.find({ userId: parent.id });
82 | },
83 | },
84 |
85 | hobbies: {
86 | type: new GraphQLList(HobbyType),
87 | resolve(parent, args) {
88 | return Hobby.find({ userId: parent.id });
89 | },
90 | },
91 | }),
92 | });
93 |
94 | const HobbyType = new GraphQLObjectType({
95 | name: "Hobby",
96 | description: "Hobby description",
97 | fields: () => ({
98 | id: { type: GraphQLID },
99 | title: { type: GraphQLString },
100 | description: { type: GraphQLString },
101 | userId: { type: GraphQLNonNull(GraphQLString) },
102 | user: {
103 | type: UserType,
104 | resolve(parent, args) {
105 | return User.findById(parent.userId);
106 | },
107 | },
108 | }),
109 | });
110 |
111 | //Post type (id, comment)
112 | const PostType = new GraphQLObjectType({
113 | name: "Post",
114 | description: "Post description",
115 | fields: () => ({
116 | id: { type: GraphQLID },
117 | comment: { type: GraphQLString },
118 | userId: { type: GraphQLString },
119 | user: {
120 | type: UserType,
121 | resolve(parent, args) {
122 | return User.findById(parent.userId);
123 | },
124 | },
125 | }),
126 | });
127 |
128 | //RootQuery
129 | const RootQuery = new GraphQLObjectType({
130 | name: "RootQueryType",
131 | description: "Description",
132 | fields: {
133 | user: {
134 | type: UserType,
135 | args: { id: { type: GraphQLString } },
136 |
137 | resolve(parent, args) {
138 | return User.findById(args.id);
139 | },
140 | },
141 |
142 | users: {
143 | type: new GraphQLList(UserType),
144 | resolve(parent, args) {
145 | return User.find({});
146 | },
147 | },
148 |
149 | hobby: {
150 | type: HobbyType,
151 | args: { id: { type: GraphQLID } },
152 |
153 | resolve(parent, argsf) {
154 | //return data for our hobby
155 |
156 | return Hobby.findById(args.id);
157 | },
158 | },
159 |
160 | hobbies: {
161 | type: new GraphQLList(HobbyType),
162 |
163 | resolve(parent, args) {
164 | return Hobby.find({ id: args.userId });
165 | },
166 | },
167 |
168 | post: {
169 | type: PostType,
170 | args: { id: { type: GraphQLID } },
171 |
172 | resolve(parent, args) {
173 | return Post.findById(args.id);
174 | },
175 | },
176 |
177 | posts: {
178 | type: new GraphQLList(PostType),
179 | resolve(parent, args) {
180 | return Post.find({});
181 | },
182 | },
183 | },
184 | });
185 |
186 | //=== Mutations ===//
187 | const Mutation = new GraphQLObjectType({
188 | name: "Mutation",
189 | fields: {
190 | CreateUser: {
191 | type: UserType,
192 | args: {
193 | name: { type: GraphQLNonNull(GraphQLString) },
194 | age: { type: GraphQLNonNull(GraphQLInt) },
195 | profession: { type: GraphQLString },
196 | },
197 |
198 | resolve(parent, args) {
199 | let user = User({
200 | name: args.name,
201 | age: args.age,
202 | profession: args.profession,
203 | });
204 |
205 | return user.save();
206 | },
207 | },
208 | //Update User
209 | UpdateUser: {
210 | type: UserType,
211 | args: {
212 | id: { type: GraphQLNonNull(GraphQLString) },
213 | name: { type: GraphQLNonNull(GraphQLString) },
214 | age: { type: GraphQLNonNull(GraphQLInt) },
215 | profession: { type: GraphQLString },
216 | },
217 | resolve(parent, args) {
218 | return (updateUser = User.findByIdAndUpdate(
219 | args.id,
220 | {
221 | $set: {
222 | name: args.name,
223 | age: args.age,
224 | profession: args.profession,
225 | },
226 | },
227 | { new: true } // send back the updated objecttype
228 | ));
229 | },
230 | },
231 | //RemoveUser
232 | RemoveUser: {
233 | type: UserType,
234 | args: {
235 | id: { type: GraphQLNonNull(GraphQLString) },
236 | },
237 | resolve(parent, args) {
238 | let removedUser = User.findByIdAndRemove(args.id).exec();
239 | if (!removedUser) {
240 | throw new "Error"();
241 | }
242 | return removedUser;
243 | },
244 | },
245 |
246 | CreatePost: {
247 | type: PostType,
248 | args: {
249 | comment: { type: GraphQLNonNull(GraphQLString) },
250 | userId: { type: GraphQLNonNull(GraphQLString) },
251 | },
252 |
253 | resolve(parent, args) {
254 | let post = Post({
255 | comment: args.comment,
256 | userId: args.userId,
257 | });
258 | return post.save();
259 | },
260 | },
261 |
262 | //todo: UpdatePost
263 | UpdatePost: {
264 | type: PostType,
265 | args: {
266 | id: { type: GraphQLNonNull(GraphQLString) },
267 | comment: { type: GraphQLNonNull(GraphQLString) },
268 | },
269 | resolve(parent, args) {
270 | return (updatedPost = Post.findByIdAndUpdate(
271 | args.id,
272 | {
273 | $set: {
274 | comment: args.comment,
275 | },
276 | },
277 | { new: true }
278 | ));
279 | },
280 | },
281 | //Remove Post
282 | RemovePost: {
283 | type: PostType,
284 | args: {
285 | id: { type: GraphQLNonNull(GraphQLString) },
286 | },
287 | resolve(parent, args) {
288 | let removedPost = Post.findByIdAndRemove(args.id).exec();
289 |
290 | if (!removedPost) {
291 | throw new "Error"();
292 | }
293 | return removedPost;
294 | },
295 | },
296 |
297 | //RemovePosts
298 | RemovePosts: {
299 | type: PostType,
300 | args: {
301 | ids: { type: GraphQLList(GraphQLString) },
302 | },
303 | resolve(parent, args) {
304 | let removedPosts = Post.deleteMany({
305 | _id: args.ids,
306 | });
307 | if (!removedPosts) {
308 | throw new "Error"();
309 | }
310 | return removedPosts;
311 | },
312 | },
313 |
314 | //todo: CreateHobby mutation
315 | CreateHobby: {
316 | type: HobbyType,
317 | args: {
318 | title: { type: GraphQLNonNull(GraphQLString) },
319 | description: { type: GraphQLNonNull(GraphQLString) },
320 | userId: { type: GraphQLNonNull(GraphQLString) },
321 | },
322 | resolve(parent, args) {
323 | let hobby = Hobby({
324 | title: args.title,
325 | description: args.description,
326 | userId: args.userId,
327 | });
328 | return hobby.save();
329 | },
330 | },
331 |
332 | //Update Hobby
333 | UpdateHobby: {
334 | type: HobbyType,
335 | args: {
336 | id: { type: GraphQLNonNull(GraphQLString) },
337 | title: { type: GraphQLNonNull(GraphQLString) },
338 | description: { type: GraphQLNonNull(GraphQLString) },
339 | },
340 | resolve(parent, args) {
341 | return (updatedHobby = Hobby.findByIdAndUpdate(
342 | args.id,
343 | {
344 | $set: {
345 | title: args.title,
346 | description: args.description,
347 | },
348 | },
349 | { new: true }
350 | ));
351 | },
352 | },
353 | //Remove Hobby
354 | RemoveHobby: {
355 | type: HobbyType,
356 | args: {
357 | id: { type: GraphQLNonNull(GraphQLString) },
358 | },
359 | resolve(parent, args) {
360 | let removedHobby = Hobby.findByIdAndRemove(args.id).exec();
361 | if (!removedHobby) {
362 | throw new "Error"();
363 | }
364 | return removedHobby;
365 | },
366 | },
367 |
368 | //RemoveHobbies
369 | RemoveHobbies: {
370 | type: HobbyType,
371 | args: {
372 | ids: { type: GraphQLList(GraphQLString) },
373 | },
374 | resolve(parent, args) {
375 | let removedHobbies = Hobby.deleteMany({
376 | _id: args.ids,
377 | }).exec();
378 | if (!removedHobbies) {
379 | throw new "Error"();
380 | }
381 | return removedHobbies;
382 | },
383 | },
384 | }, //End of the fields
385 | });
386 |
387 | module.exports = new GraphQLSchema({
388 | query: RootQuery,
389 | mutation: Mutation,
390 | });
391 |
--------------------------------------------------------------------------------
/server/schema/types_schema.js:
--------------------------------------------------------------------------------
1 | const graphql = require('graphql');
2 |
3 | const {
4 | GraphQLObjectType,
5 | GraphQLID,
6 | GraphQLString,
7 | GraphQLInt,
8 | GraphQLBoolean,
9 | GraphQLFloat,
10 | GraphQLSchema,
11 | GraphQLNonNull
12 |
13 | } = graphql
14 |
15 | //Scalar Type
16 | /*
17 | String = GraphQLString
18 | int
19 | Float
20 | Boolean
21 | ID
22 |
23 | */
24 |
25 | const Person = new GraphQLObjectType({
26 | name: 'Person',
27 | description: 'Represents a Person Type',
28 | fields: () => ({
29 | id: {type: GraphQLID},
30 | name: {type: new GraphQLNonNull(GraphQLString) },
31 | age: {type: GraphQLInt},
32 | isMarried: {type: GraphQLBoolean},
33 | gpa: {type: GraphQLFloat},
34 |
35 | justAType: {
36 | type: Person,
37 | resolve(parent, args) {
38 | return parent;
39 | }
40 | }
41 | })
42 | });
43 |
44 | //RootQuery
45 | const RootQuery = new GraphQLObjectType({
46 | name: 'RootQueryType',
47 | description: 'Description',
48 | fields: {
49 | person: {
50 | type: Person,
51 | //args: {id: {type: GraphQLString}},
52 | resolve(parent, args) {
53 | //we resolve with data
54 | //get and return data from a datasource
55 |
56 | let personObj = {
57 | //id: {type: GraphQLID},
58 | name: 'Antonio',
59 | age: 34,
60 | isMarried: true,
61 | gpa: 4.0,
62 |
63 | };
64 |
65 | return personObj;
66 | }
67 | }
68 |
69 |
70 | }
71 | });
72 |
73 | module.exports = new GraphQLSchema({
74 | query: RootQuery,
75 | });
76 |
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------