└── GraphQLDemo ├── .classpath ├── .factorypath ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── .project ├── .settings ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.apt.core.prefs ├── org.eclipse.jdt.core.prefs ├── org.eclipse.m2e.core.prefs └── org.eclipse.wst.common.project.facet.core.xml ├── README.md ├── mvnw ├── mvnw.cmd ├── pom.xml ├── src ├── main │ ├── java │ │ └── com │ │ │ └── quinnox │ │ │ └── example │ │ │ ├── SpringBootGrapqlExampleApplication.java │ │ │ ├── client │ │ │ └── GraphQLClient.java │ │ │ ├── controller │ │ │ └── ManagedStudentController.java │ │ │ ├── datafetcher │ │ │ ├── AllStudentDataFetcher.java │ │ │ └── StudentDataFetcher.java │ │ │ ├── model │ │ │ ├── Product.java │ │ │ └── Student.java │ │ │ ├── repository │ │ │ └── StudentRepository.java │ │ │ ├── service │ │ │ └── GraphQLService.java │ │ │ └── util │ │ │ ├── CSVParser.java │ │ │ └── ExcelReader.java │ └── resources │ │ ├── application.properties │ │ ├── books.graphql │ │ ├── student.csv2 │ │ ├── student.graphql │ │ └── student.xlsx └── test │ └── java │ └── com │ └── techprimers │ └── graphql │ └── springbootgrapqlexample │ └── SpringBootGrapqlExampleApplicationTests.java └── target ├── classes ├── META-INF │ ├── MANIFEST.MF │ └── maven │ │ └── com.techprimers.graphql │ │ └── GraphQLDemo │ │ ├── pom.properties │ │ └── pom.xml ├── application.properties ├── books.graphql ├── com │ └── quinnox │ │ └── example │ │ ├── SpringBootGrapqlExampleApplication.class │ │ ├── client │ │ └── GraphQLClient.class │ │ ├── controller │ │ └── ManagedStudentController.class │ │ ├── datafetcher │ │ ├── AllStudentDataFetcher.class │ │ └── StudentDataFetcher.class │ │ ├── model │ │ ├── Product.class │ │ └── Student.class │ │ ├── repository │ │ └── StudentRepository.class │ │ ├── service │ │ └── GraphQLService.class │ │ └── util │ │ ├── CSVParser.class │ │ └── ExcelReader.class ├── student.csv2 ├── student.graphql └── student.xlsx ├── maven-status └── maven-compiler-plugin │ └── compile │ └── default-compile │ ├── createdFiles.lst │ └── inputFiles.lst └── test-classes └── com └── techprimers └── graphql └── springbootgrapqlexample └── SpringBootGrapqlExampleApplicationTests.class /GraphQLDemo/.classpath: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /GraphQLDemo/.factorypath: -------------------------------------------------------------------------------- 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 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /GraphQLDemo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /GraphQLDemo/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip 2 | -------------------------------------------------------------------------------- /GraphQLDemo/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | GraphQLDemo 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.common.project.facet.core.builder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.springframework.ide.eclipse.core.springbuilder 20 | 21 | 22 | 23 | 24 | org.springframework.ide.eclipse.boot.validation.springbootbuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.springframework.ide.eclipse.core.springnature 36 | org.eclipse.jdt.core.javanature 37 | org.eclipse.m2e.core.maven2Nature 38 | org.eclipse.wst.common.project.facet.core.nature 39 | 40 | 41 | -------------------------------------------------------------------------------- /GraphQLDemo/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding/=UTF-8 6 | -------------------------------------------------------------------------------- /GraphQLDemo/.settings/org.eclipse.jdt.apt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.apt.aptEnabled=true 3 | -------------------------------------------------------------------------------- /GraphQLDemo/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 3 | org.eclipse.jdt.core.compiler.compliance=1.8 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.processAnnotations=enabled 6 | org.eclipse.jdt.core.compiler.source=1.8 7 | -------------------------------------------------------------------------------- /GraphQLDemo/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /GraphQLDemo/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /GraphQLDemo/README.md: -------------------------------------------------------------------------------- 1 | # Spring Boot with GraphQL Query Example 2 | 3 | ## Book Store 4 | - `/rest/books` is the REST resource which can fetch Books information 5 | - DataFetchers are Interfaces for RuntimeWiring of GraphQL with JpaRepository 6 | 7 | ## Sample GraphQL Scalar Queries 8 | - Accessible under `http://localhost:8091/rest/books` 9 | - Usage for `allBooks` 10 | `{ 11 | allBooks { 12 | isn 13 | title 14 | authors 15 | publisher 16 | } 17 | }` 18 | - Usage for `book` 19 | `{ 20 | book(id: "123") { 21 | title 22 | authors 23 | publisher 24 | }` 25 | - Combination of both `allBooks` and `book` 26 | `{ 27 | allBooks { 28 | title 29 | authors 30 | } 31 | book(id: "124") { 32 | title 33 | authors 34 | publisher 35 | } 36 | }` -------------------------------------------------------------------------------- /GraphQLDemo/mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven2 Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /etc/mavenrc ] ; then 40 | . /etc/mavenrc 41 | fi 42 | 43 | if [ -f "$HOME/.mavenrc" ] ; then 44 | . "$HOME/.mavenrc" 45 | fi 46 | 47 | fi 48 | 49 | # OS specific support. $var _must_ be set to either true or false. 50 | cygwin=false; 51 | darwin=false; 52 | mingw=false 53 | case "`uname`" in 54 | CYGWIN*) cygwin=true ;; 55 | MINGW*) mingw=true;; 56 | Darwin*) darwin=true 57 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 58 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 59 | if [ -z "$JAVA_HOME" ]; then 60 | if [ -x "/usr/libexec/java_home" ]; then 61 | export JAVA_HOME="`/usr/libexec/java_home`" 62 | else 63 | export JAVA_HOME="/Library/Java/Home" 64 | fi 65 | fi 66 | ;; 67 | esac 68 | 69 | if [ -z "$JAVA_HOME" ] ; then 70 | if [ -r /etc/gentoo-release ] ; then 71 | JAVA_HOME=`java-config --jre-home` 72 | fi 73 | fi 74 | 75 | if [ -z "$M2_HOME" ] ; then 76 | ## resolve links - $0 may be a link to maven's home 77 | PRG="$0" 78 | 79 | # need this for relative symlinks 80 | while [ -h "$PRG" ] ; do 81 | ls=`ls -ld "$PRG"` 82 | link=`expr "$ls" : '.*-> \(.*\)$'` 83 | if expr "$link" : '/.*' > /dev/null; then 84 | PRG="$link" 85 | else 86 | PRG="`dirname "$PRG"`/$link" 87 | fi 88 | done 89 | 90 | saveddir=`pwd` 91 | 92 | M2_HOME=`dirname "$PRG"`/.. 93 | 94 | # make it fully qualified 95 | M2_HOME=`cd "$M2_HOME" && pwd` 96 | 97 | cd "$saveddir" 98 | # echo Using m2 at $M2_HOME 99 | fi 100 | 101 | # For Cygwin, ensure paths are in UNIX format before anything is touched 102 | if $cygwin ; then 103 | [ -n "$M2_HOME" ] && 104 | M2_HOME=`cygpath --unix "$M2_HOME"` 105 | [ -n "$JAVA_HOME" ] && 106 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 107 | [ -n "$CLASSPATH" ] && 108 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 109 | fi 110 | 111 | # For Migwn, ensure paths are in UNIX format before anything is touched 112 | if $mingw ; then 113 | [ -n "$M2_HOME" ] && 114 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 115 | [ -n "$JAVA_HOME" ] && 116 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 117 | # TODO classpath? 118 | fi 119 | 120 | if [ -z "$JAVA_HOME" ]; then 121 | javaExecutable="`which javac`" 122 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 123 | # readlink(1) is not available as standard on Solaris 10. 124 | readLink=`which readlink` 125 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 126 | if $darwin ; then 127 | javaHome="`dirname \"$javaExecutable\"`" 128 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 129 | else 130 | javaExecutable="`readlink -f \"$javaExecutable\"`" 131 | fi 132 | javaHome="`dirname \"$javaExecutable\"`" 133 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 134 | JAVA_HOME="$javaHome" 135 | export JAVA_HOME 136 | fi 137 | fi 138 | fi 139 | 140 | if [ -z "$JAVACMD" ] ; then 141 | if [ -n "$JAVA_HOME" ] ; then 142 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 143 | # IBM's JDK on AIX uses strange locations for the executables 144 | JAVACMD="$JAVA_HOME/jre/sh/java" 145 | else 146 | JAVACMD="$JAVA_HOME/bin/java" 147 | fi 148 | else 149 | JAVACMD="`which java`" 150 | fi 151 | fi 152 | 153 | if [ ! -x "$JAVACMD" ] ; then 154 | echo "Error: JAVA_HOME is not defined correctly." >&2 155 | echo " We cannot execute $JAVACMD" >&2 156 | exit 1 157 | fi 158 | 159 | if [ -z "$JAVA_HOME" ] ; then 160 | echo "Warning: JAVA_HOME environment variable is not set." 161 | fi 162 | 163 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 164 | 165 | # traverses directory structure from process work directory to filesystem root 166 | # first directory with .mvn subdirectory is considered project base directory 167 | find_maven_basedir() { 168 | 169 | if [ -z "$1" ] 170 | then 171 | echo "Path not specified to find_maven_basedir" 172 | return 1 173 | fi 174 | 175 | basedir="$1" 176 | wdir="$1" 177 | while [ "$wdir" != '/' ] ; do 178 | if [ -d "$wdir"/.mvn ] ; then 179 | basedir=$wdir 180 | break 181 | fi 182 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 183 | if [ -d "${wdir}" ]; then 184 | wdir=`cd "$wdir/.."; pwd` 185 | fi 186 | # end of workaround 187 | done 188 | echo "${basedir}" 189 | } 190 | 191 | # concatenates all lines of a file 192 | concat_lines() { 193 | if [ -f "$1" ]; then 194 | echo "$(tr -s '\n' ' ' < "$1")" 195 | fi 196 | } 197 | 198 | BASE_DIR=`find_maven_basedir "$(pwd)"` 199 | if [ -z "$BASE_DIR" ]; then 200 | exit 1; 201 | fi 202 | 203 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 204 | echo $MAVEN_PROJECTBASEDIR 205 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 206 | 207 | # For Cygwin, switch paths to Windows format before running java 208 | if $cygwin; then 209 | [ -n "$M2_HOME" ] && 210 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 211 | [ -n "$JAVA_HOME" ] && 212 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 213 | [ -n "$CLASSPATH" ] && 214 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 215 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 216 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 217 | fi 218 | 219 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 220 | 221 | exec "$JAVACMD" \ 222 | $MAVEN_OPTS \ 223 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 224 | "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 225 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 226 | -------------------------------------------------------------------------------- /GraphQLDemo/mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM http://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven2 Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' 39 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 40 | 41 | @REM set %HOME% to equivalent of $HOME 42 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 43 | 44 | @REM Execute a user defined script before this one 45 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 46 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 47 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 48 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 49 | :skipRcPre 50 | 51 | @setlocal 52 | 53 | set ERROR_CODE=0 54 | 55 | @REM To isolate internal variables from possible post scripts, we use another setlocal 56 | @setlocal 57 | 58 | @REM ==== START VALIDATION ==== 59 | if not "%JAVA_HOME%" == "" goto OkJHome 60 | 61 | echo. 62 | echo Error: JAVA_HOME not found in your environment. >&2 63 | echo Please set the JAVA_HOME variable in your environment to match the >&2 64 | echo location of your Java installation. >&2 65 | echo. 66 | goto error 67 | 68 | :OkJHome 69 | if exist "%JAVA_HOME%\bin\java.exe" goto init 70 | 71 | echo. 72 | echo Error: JAVA_HOME is set to an invalid directory. >&2 73 | echo JAVA_HOME = "%JAVA_HOME%" >&2 74 | echo Please set the JAVA_HOME variable in your environment to match the >&2 75 | echo location of your Java installation. >&2 76 | echo. 77 | goto error 78 | 79 | @REM ==== END VALIDATION ==== 80 | 81 | :init 82 | 83 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 84 | @REM Fallback to current working directory if not found. 85 | 86 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 87 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 88 | 89 | set EXEC_DIR=%CD% 90 | set WDIR=%EXEC_DIR% 91 | :findBaseDir 92 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 93 | cd .. 94 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 95 | set WDIR=%CD% 96 | goto findBaseDir 97 | 98 | :baseDirFound 99 | set MAVEN_PROJECTBASEDIR=%WDIR% 100 | cd "%EXEC_DIR%" 101 | goto endDetectBaseDir 102 | 103 | :baseDirNotFound 104 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 105 | cd "%EXEC_DIR%" 106 | 107 | :endDetectBaseDir 108 | 109 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 110 | 111 | @setlocal EnableExtensions EnableDelayedExpansion 112 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 113 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 114 | 115 | :endReadAdditionalConfig 116 | 117 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 118 | 119 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 120 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 121 | 122 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 123 | if ERRORLEVEL 1 goto error 124 | goto end 125 | 126 | :error 127 | set ERROR_CODE=1 128 | 129 | :end 130 | @endlocal & set ERROR_CODE=%ERROR_CODE% 131 | 132 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 133 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 134 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 135 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 136 | :skipRcPost 137 | 138 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 139 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 140 | 141 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 142 | 143 | exit /B %ERROR_CODE% 144 | -------------------------------------------------------------------------------- /GraphQLDemo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.techprimers.graphql 7 | GraphQLDemo 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | spring-boot-grapql-example 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.1.0.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-data-jpa 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-web 35 | 36 | 37 | 38 | org.hsqldb 39 | hsqldb 40 | runtime 41 | 42 | 43 | org.projectlombok 44 | lombok 45 | true 46 | 47 | 48 | org.apache.poi 49 | poi 50 | 3.17 51 | 52 | 53 | 54 | 55 | org.apache.poi 56 | poi-ooxml 57 | 3.17 58 | 59 | 60 | com.graphql-java 61 | graphql-spring-boot-starter 62 | 3.6.0 63 | 64 | 65 | com.graphql-java 66 | graphql-java-tools 67 | 3.2.0 68 | 69 | 70 | 71 | org.springframework.boot 72 | spring-boot-starter-test 73 | test 74 | 75 | 76 | 77 | org.apache.httpcomponents 78 | httpclient 79 | 4.5.2 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | org.springframework.boot 88 | spring-boot-maven-plugin 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/SpringBootGrapqlExampleApplication.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootGrapqlExampleApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootGrapqlExampleApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/client/GraphQLClient.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example.client; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | import java.io.InputStreamReader; 7 | import java.io.OutputStream; 8 | 9 | import org.apache.http.Header; 10 | import org.apache.http.HttpEntity; 11 | import org.apache.http.HttpResponse; 12 | import org.apache.http.client.HttpClient; 13 | import org.apache.http.client.methods.HttpPost; 14 | import org.apache.http.entity.StringEntity; 15 | import org.apache.http.impl.client.DefaultHttpClient; 16 | 17 | public class GraphQLClient { 18 | public static void main(String[] args) throws Exception{ 19 | HttpClient client = new DefaultHttpClient(); 20 | String queryForOne = "{student(rollNumber:\"0607cs131009\"){ name email rollNumber address } }"; 21 | String queryForAll = "{allStudent{ name email rollNumber address}}"; 22 | String url = "http://localhost:2222/rest/student/getAllStudent"; 23 | HttpPost post = new HttpPost(url); 24 | StringEntity entity = new StringEntity(queryForAll); 25 | post.setEntity(entity); 26 | HttpResponse response = client.execute(post); 27 | InputStream stream = response.getEntity().getContent(); 28 | BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); 29 | String line = reader.readLine(); 30 | while(line != null){ 31 | System.err.println(line); 32 | line = reader.readLine(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/controller/ManagedStudentController.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example.controller; 2 | 3 | import graphql.ExecutionResult; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.http.HttpStatus; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.web.bind.annotation.PostMapping; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import com.quinnox.example.service.GraphQLService; 13 | 14 | @RequestMapping("/rest/student") 15 | @RestController 16 | public class ManagedStudentController { 17 | 18 | @Autowired 19 | GraphQLService graphQLService; 20 | 21 | @PostMapping(value="/getAllStudent") 22 | public ResponseEntity getAllStudents(@RequestBody String query) { 23 | ExecutionResult execute = graphQLService.getGraphQL().execute(query); 24 | 25 | return new ResponseEntity<>(execute, HttpStatus.OK); 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/datafetcher/AllStudentDataFetcher.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example.datafetcher; 2 | 3 | 4 | import com.quinnox.example.model.Student; 5 | import com.quinnox.example.repository.StudentRepository; 6 | 7 | import graphql.schema.DataFetcher; 8 | import graphql.schema.DataFetchingEnvironment; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Component; 11 | 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | @Component 16 | public class AllStudentDataFetcher implements DataFetcher>{ 17 | 18 | @Autowired 19 | StudentRepository studentRepository; 20 | 21 | @Override 22 | public List get(DataFetchingEnvironment dataFetchingEnvironment) { 23 | List list = new ArrayList<>(); 24 | studentRepository.findAll().forEach(student ->{ 25 | list.add(student); 26 | }); 27 | return list; 28 | } 29 | } -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/datafetcher/StudentDataFetcher.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example.datafetcher; 2 | 3 | import com.quinnox.example.model.Student; 4 | import com.quinnox.example.repository.StudentRepository; 5 | 6 | import graphql.schema.DataFetcher; 7 | import graphql.schema.DataFetchingEnvironment; 8 | 9 | import org.hibernate.criterion.Example; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Component; 12 | 13 | @Component 14 | public class StudentDataFetcher implements DataFetcher { 15 | 16 | @Autowired 17 | StudentRepository studentRepository; 18 | 19 | @Override 20 | public Student get(DataFetchingEnvironment dataFetchingEnvironment) { 21 | 22 | String roll = dataFetchingEnvironment.getArgument("rollNumber"); 23 | return studentRepository.findById(roll).get(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/model/Product.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example.model; 2 | 3 | public class Product { 4 | private String productId; 5 | private String name; 6 | private String manufacturingDate; 7 | private String expiryDate; 8 | private float price; 9 | 10 | public String getProductId() { 11 | return productId; 12 | } 13 | 14 | public void setProductId(String productId) { 15 | this.productId = productId; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public void setName(String name) { 23 | this.name = name; 24 | } 25 | 26 | public String getManufacturingDate() { 27 | return manufacturingDate; 28 | } 29 | 30 | public void setManufacturingDate(String manufacturingDate) { 31 | this.manufacturingDate = manufacturingDate; 32 | } 33 | 34 | public String getExpiryDate() { 35 | return expiryDate; 36 | } 37 | 38 | public void setExpiryDate(String expiryDate) { 39 | this.expiryDate = expiryDate; 40 | } 41 | 42 | public float getPrice() { 43 | return price; 44 | } 45 | 46 | public void setPrice(float price) { 47 | this.price = price; 48 | } 49 | 50 | @Override 51 | public String toString() { 52 | return "Product [productId=" + productId + ", name=" + name + ", manufacturingDate=" + manufacturingDate 53 | + ", expiryDate=" + expiryDate + ", price=" + price + "]"; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/model/Student.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example.model; 2 | import lombok.AllArgsConstructor; 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | 11 | @Setter 12 | @Getter 13 | @AllArgsConstructor 14 | @NoArgsConstructor 15 | @Table 16 | @Entity 17 | public class Student { 18 | 19 | @Id 20 | private String rollNumber; 21 | private String name; 22 | private String email; 23 | private String address; 24 | 25 | public String getRollNumber() { 26 | return rollNumber; 27 | } 28 | 29 | public Student setRollNumber(String rollNumber) { 30 | this.rollNumber = rollNumber; 31 | return this; 32 | } 33 | 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public Student setName(String name) { 39 | this.name = name; 40 | return this; 41 | } 42 | 43 | public String getEmail() { 44 | return email; 45 | } 46 | 47 | public Student setEmail(String email) { 48 | this.email = email; 49 | return this; 50 | } 51 | 52 | public String getAddress() { 53 | return address; 54 | } 55 | 56 | public Student setAddress(String address) { 57 | this.address = address; 58 | return this; 59 | } 60 | 61 | @Override 62 | public String toString() { 63 | return "Student [rollNumber=" + rollNumber + ", name=" + name + ", email=" + email + ", address=" + address 64 | + "]"; 65 | } 66 | 67 | 68 | } 69 | -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/repository/StudentRepository.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example.repository; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.repository.CrudRepository; 5 | 6 | import com.quinnox.example.model.Student; 7 | 8 | public interface StudentRepository extends CrudRepository{ 9 | 10 | } 11 | -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/service/GraphQLService.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example.service; 2 | 3 | import com.quinnox.example.datafetcher.AllStudentDataFetcher; 4 | import com.quinnox.example.datafetcher.StudentDataFetcher; 5 | import com.quinnox.example.model.Student; 6 | import com.quinnox.example.repository.StudentRepository; 7 | import com.quinnox.example.util.CSVParser; 8 | import com.quinnox.example.util.ExcelReader; 9 | 10 | import graphql.GraphQL; 11 | import graphql.schema.GraphQLSchema; 12 | import graphql.schema.idl.RuntimeWiring; 13 | import graphql.schema.idl.SchemaGenerator; 14 | import graphql.schema.idl.SchemaParser; 15 | import graphql.schema.idl.TypeDefinitionRegistry; 16 | import org.springframework.beans.factory.annotation.Autowired; 17 | import org.springframework.beans.factory.annotation.Value; 18 | import org.springframework.core.io.Resource; 19 | import org.springframework.stereotype.Service; 20 | 21 | import javax.annotation.PostConstruct; 22 | import java.io.File; 23 | import java.io.FileInputStream; 24 | import java.io.IOException; 25 | import java.io.InputStream; 26 | import java.util.List; 27 | import java.util.stream.Stream; 28 | 29 | @Service 30 | public class GraphQLService { 31 | 32 | @Autowired 33 | StudentRepository studentRepository; 34 | 35 | @Value("classpath:student.graphql") 36 | Resource resource; 37 | 38 | private GraphQL graphQL; 39 | @Autowired 40 | private AllStudentDataFetcher allStudentDataFetcher; 41 | @Autowired 42 | private StudentDataFetcher studentDataFetcher; 43 | 44 | @PostConstruct 45 | private void loadSchema() throws Exception { 46 | 47 | // Load Books into the Book Repository 48 | loadDataIntoHSQL(); 49 | 50 | // get the schema 51 | File schemaFile = resource.getFile(); 52 | // parse schema 53 | TypeDefinitionRegistry typeRegistry = new SchemaParser().parse(schemaFile); 54 | RuntimeWiring wiring = buildRuntimeWiring(); 55 | GraphQLSchema schema = new SchemaGenerator().makeExecutableSchema(typeRegistry, wiring); 56 | graphQL = GraphQL.newGraphQL(schema).build(); 57 | } 58 | 59 | /*private void loadDataIntoHSQL() { 60 | 61 | Stream.of(new Student().setRollNumber("1").setName("mohit").setEmail("mohit@gmail.com").setAddress("New York"), 62 | new Student().setRollNumber("2").setName("poonam").setEmail("poonam@gmail.com").setAddress("New York"), 63 | new Student().setRollNumber("3").setName("ankit").setEmail("ankit@gmail.com").setAddress("New York"), 64 | new Student().setRollNumber("4").setName("adi").setEmail("adi@gmail.com").setAddress("New York")) 65 | .forEach(student -> { 66 | studentRepository.save(student); 67 | }); 68 | }*/ 69 | 70 | private void loadDataIntoHSQL() throws Exception{ 71 | CSVParser parser = new CSVParser(); 72 | String path = "C:\\Users\\Mohitk\\Desktop\\student.csv2.txt"; 73 | List list = parser.parseCSV(new File(path)); 74 | list.stream().forEach(student ->{ 75 | studentRepository.save(student); 76 | }); 77 | 78 | } 79 | 80 | /*private void loadDataIntoHSQL() throws Exception{ 81 | ExcelReader reader = new ExcelReader(); 82 | String path = "C:\\Users\\Mohitk\\Desktop\\student..xlsx"; 83 | File f = new File(path); 84 | List list = reader.readExcelUsingXSSF(f); 85 | list.stream().forEach(student ->{ 86 | studentRepository.save(student); 87 | }); 88 | }*/ 89 | 90 | private RuntimeWiring buildRuntimeWiring() { 91 | return RuntimeWiring 92 | .newRuntimeWiring().type("Query", typeWiring -> typeWiring 93 | .dataFetcher("allStudent", allStudentDataFetcher).dataFetcher("student", studentDataFetcher)) 94 | .build(); 95 | } 96 | 97 | public GraphQL getGraphQL() { 98 | return graphQL; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/util/CSVParser.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example.util; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.File; 5 | import java.io.FileReader; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | import com.quinnox.example.model.Student; 10 | 11 | public class CSVParser { 12 | 13 | public static List parseCSV(File file) throws Exception{ 14 | BufferedReader br = new BufferedReader(new FileReader(file)); 15 | String line = br.readLine(); 16 | List studentList = new ArrayList(); 17 | while(line != null){ 18 | String[] token = line.split(","); 19 | Student s = mapStudent(new Student(), token); 20 | studentList.add(s); 21 | line = br.readLine(); 22 | } 23 | return studentList; 24 | } 25 | 26 | public static Student mapStudent(Student s , String[] token){ 27 | s.setRollNumber(token[0]); 28 | s.setName(token[1]); 29 | s.setEmail(token[2]); 30 | s.setAddress(token[3]); 31 | return s; 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /GraphQLDemo/src/main/java/com/quinnox/example/util/ExcelReader.java: -------------------------------------------------------------------------------- 1 | package com.quinnox.example.util; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.util.ArrayList; 6 | import java.util.Iterator; 7 | import java.util.List; 8 | 9 | import org.apache.poi.ss.usermodel.Row; 10 | import org.apache.poi.xssf.usermodel.XSSFSheet; 11 | import org.apache.poi.xssf.usermodel.XSSFWorkbook; 12 | 13 | import com.quinnox.example.model.Student; 14 | 15 | 16 | public class ExcelReader { 17 | 18 | private static List list = new ArrayList<>(); 19 | 20 | public static void main(String[] args) { 21 | //readExcelUsingXSSF(); 22 | } 23 | 24 | public static List readExcelUsingXSSF(File f) { 25 | try { 26 | //File f = new File("D:\\quinnox projects\\cyc\\git\\GraphQLDemo\\src\\main\\resources\\student.xlsx"); 27 | FileInputStream file = new FileInputStream(f); 28 | 29 | // Create Workbook instance holding reference to .xlsx file 30 | XSSFWorkbook workbook = new XSSFWorkbook(file); 31 | 32 | // Get first/desired sheet from the workbook 33 | XSSFSheet sheet = workbook.getSheetAt(0); 34 | 35 | // Iterate through each rows one by one 36 | Iterator rowIterator = sheet.iterator(); 37 | int i = 0; 38 | while(rowIterator.hasNext()){ 39 | Row row = rowIterator.next(); 40 | if(row.getRowNum() != 0) { 41 | assignStudent(row); 42 | } 43 | } 44 | //list.stream().forEach(s -> System.err.println(s)); 45 | file.close(); 46 | } catch (Exception e) { 47 | e.printStackTrace(); 48 | } 49 | return list; 50 | } 51 | 52 | public static void assignStudent(Row row){ 53 | Student s = new Student(); 54 | s.setRollNumber(row.getCell(0).toString()); 55 | s.setName(row.getCell(1).toString()); 56 | s.setEmail(row.getCell(2).toString()); 57 | s.setAddress(row.getCell(3).toString()); 58 | list.add(s); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /GraphQLDemo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=2222 -------------------------------------------------------------------------------- /GraphQLDemo/src/main/resources/books.graphql: -------------------------------------------------------------------------------- 1 | schema { 2 | query: Query 3 | } 4 | 5 | type Query { 6 | allBooks: [Book] 7 | book(id: String): Book 8 | } 9 | 10 | type Book { 11 | isn: String 12 | title: String 13 | publisher: String 14 | authors: [String] 15 | publishedDate: String 16 | } -------------------------------------------------------------------------------- /GraphQLDemo/src/main/resources/student.csv2: -------------------------------------------------------------------------------- 1 | 0607cs131008,mohit khare,mohit@gmail.com,New York 2 | 0607cs131009,poonam,poonam@gmail.com,Boston 3 | 0607cs131010,jake,jake@gmail.com,Dallas 4 | 0607cs131011,katelyn,kate@gmail.com,Ohio 5 | 0607cs131012,ryan,ryan@gmail.com,Wisconsin -------------------------------------------------------------------------------- /GraphQLDemo/src/main/resources/student.graphql: -------------------------------------------------------------------------------- 1 | schema { 2 | query: Query 3 | } 4 | 5 | type Query { 6 | allStudent: [Student] 7 | student(rollNumber: String): Student 8 | } 9 | 10 | type Student { 11 | rollNumber: String 12 | name: String 13 | email: String 14 | address: String 15 | } -------------------------------------------------------------------------------- /GraphQLDemo/src/main/resources/student.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/src/main/resources/student.xlsx -------------------------------------------------------------------------------- /GraphQLDemo/src/test/java/com/techprimers/graphql/springbootgrapqlexample/SpringBootGrapqlExampleApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.techprimers.graphql.springbootgrapqlexample; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootGrapqlExampleApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Implementation-Title: spring-boot-grapql-example 3 | Implementation-Version: 0.0.1-SNAPSHOT 4 | Built-By: MohitK 5 | Implementation-Vendor-Id: com.techprimers.graphql 6 | Build-Jdk: 1.8.0_201 7 | Implementation-URL: https://projects.spring.io/spring-boot/#/spring-bo 8 | ot-starter-parent/GraphQLDemo 9 | Created-By: Maven Integration for Eclipse 10 | 11 | -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/META-INF/maven/com.techprimers.graphql/GraphQLDemo/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven Integration for Eclipse 2 | #Tue Jul 09 12:10:34 IST 2019 3 | version=0.0.1-SNAPSHOT 4 | groupId=com.techprimers.graphql 5 | m2e.projectName=GraphQLDemo 6 | m2e.projectLocation=D\:\\MIKE\\CYC\\fourthIteration\\graphQlcompleteClient\\GraphQLDemo 7 | artifactId=GraphQLDemo 8 | -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/META-INF/maven/com.techprimers.graphql/GraphQLDemo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.techprimers.graphql 7 | GraphQLDemo 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | spring-boot-grapql-example 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 2.1.0.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-data-jpa 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-web 35 | 36 | 37 | 38 | org.hsqldb 39 | hsqldb 40 | runtime 41 | 42 | 43 | org.projectlombok 44 | lombok 45 | true 46 | 47 | 48 | org.apache.poi 49 | poi 50 | 3.17 51 | 52 | 53 | 54 | 55 | org.apache.poi 56 | poi-ooxml 57 | 3.17 58 | 59 | 60 | com.graphql-java 61 | graphql-spring-boot-starter 62 | 3.6.0 63 | 64 | 65 | com.graphql-java 66 | graphql-java-tools 67 | 3.2.0 68 | 69 | 70 | 71 | org.springframework.boot 72 | spring-boot-starter-test 73 | test 74 | 75 | 76 | 77 | org.apache.httpcomponents 78 | httpclient 79 | 4.5.2 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | org.springframework.boot 88 | spring-boot-maven-plugin 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/application.properties: -------------------------------------------------------------------------------- 1 | server.port=2222 -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/books.graphql: -------------------------------------------------------------------------------- 1 | schema { 2 | query: Query 3 | } 4 | 5 | type Query { 6 | allBooks: [Book] 7 | book(id: String): Book 8 | } 9 | 10 | type Book { 11 | isn: String 12 | title: String 13 | publisher: String 14 | authors: [String] 15 | publishedDate: String 16 | } -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/SpringBootGrapqlExampleApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/SpringBootGrapqlExampleApplication.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/client/GraphQLClient.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/client/GraphQLClient.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/controller/ManagedStudentController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/controller/ManagedStudentController.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/datafetcher/AllStudentDataFetcher.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/datafetcher/AllStudentDataFetcher.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/datafetcher/StudentDataFetcher.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/datafetcher/StudentDataFetcher.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/model/Product.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/model/Product.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/model/Student.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/model/Student.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/repository/StudentRepository.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/repository/StudentRepository.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/service/GraphQLService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/service/GraphQLService.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/util/CSVParser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/util/CSVParser.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/com/quinnox/example/util/ExcelReader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/com/quinnox/example/util/ExcelReader.class -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/student.csv2: -------------------------------------------------------------------------------- 1 | 0607cs131008,mohit khare,mohit@gmail.com,New York 2 | 0607cs131009,poonam,poonam@gmail.com,Boston 3 | 0607cs131010,jake,jake@gmail.com,Dallas 4 | 0607cs131011,katelyn,kate@gmail.com,Ohio 5 | 0607cs131012,ryan,ryan@gmail.com,Wisconsin -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/student.graphql: -------------------------------------------------------------------------------- 1 | schema { 2 | query: Query 3 | } 4 | 5 | type Query { 6 | allStudent: [Student] 7 | student(rollNumber: String): Student 8 | } 9 | 10 | type Student { 11 | rollNumber: String 12 | name: String 13 | email: String 14 | address: String 15 | } -------------------------------------------------------------------------------- /GraphQLDemo/target/classes/student.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/classes/student.xlsx -------------------------------------------------------------------------------- /GraphQLDemo/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\quinnox\example\datafetcher\AllStudentDataFetcher.class 2 | com\quinnox\example\service\GraphQLService.class 3 | com\quinnox\example\controller\ManagedStudentController.class 4 | com\quinnox\example\model\Student.class 5 | com\quinnox\example\model\Product.class 6 | com\quinnox\example\repository\StudentRepository.class 7 | -------------------------------------------------------------------------------- /GraphQLDemo/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\client\GraphQLClient.java 2 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\SpringBootGrapqlExampleApplication.java 3 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\datafetcher\AllStudentDataFetcher.java 4 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\model\Student.java 5 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\controller\ManagedStudentController.java 6 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\datafetcher\StudentDataFetcher.java 7 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\model\Product.java 8 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\repository\StudentRepository.java 9 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\service\GraphQLService.java 10 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\util\CSVParser.java 11 | D:\MIKE\CYC\fourthIteration\graphQlcompleteClient\GraphQLDemo\src\main\java\com\quinnox\example\util\ExcelReader.java 12 | -------------------------------------------------------------------------------- /GraphQLDemo/target/test-classes/com/techprimers/graphql/springbootgrapqlexample/SpringBootGrapqlExampleApplicationTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit6350/graphQlcompleteClient/3de2a94de560ad7cd75d2e447112beff761cae04/GraphQLDemo/target/test-classes/com/techprimers/graphql/springbootgrapqlexample/SpringBootGrapqlExampleApplicationTests.class --------------------------------------------------------------------------------