-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabled persisted queries and added a sample persisted query for test…
…ing/validation.
- Loading branch information
1 parent
fbd7abe
commit 27f0385
Showing
18 changed files
with
319 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
GraphQL.PreProcessingExtensions.Tests/GraphQL/StarWarsCharacterResolver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
GraphQL.PreProcessingExtensions.Tests/TestServers/GraphQLTestServerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...rWars-AzureFunctions-RepoDB/PersistedQueries/AllCharactersWithFriendsPaginated-v1.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
query ($first: Int, $after: String, $friendsCount: Int) { | ||
characters(first: $first, after: $after) { | ||
totalCount | ||
pageInfo { | ||
hasNextPage | ||
hasPreviousPage | ||
startCursor | ||
endCursor | ||
} | ||
edges { | ||
cursor | ||
node { | ||
personalIdentifier | ||
name | ||
height | ||
friends(first: $friendsCount) | ||
{ | ||
edges { | ||
cursor | ||
node | ||
{ | ||
personalIdentifier | ||
name | ||
height | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...rs-AzureFunctions-RepoDB/Properties/PublishProfiles/graphql-star-wars - Zip Deploy.pubxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
https://go.microsoft.com/fwlink/?LinkID=208121. | ||
--> | ||
<Project> | ||
<PropertyGroup> | ||
<WebPublishMethod>ZipDeploy</WebPublishMethod> | ||
<PublishProvider>AzureWebSite</PublishProvider> | ||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> | ||
<LastUsedPlatform>Any CPU</LastUsedPlatform> | ||
<SiteUrlToLaunchAfterPublish>https://graphql-star-wars.azurewebsites.net</SiteUrlToLaunchAfterPublish> | ||
<LaunchSiteAfterPublish>false</LaunchSiteAfterPublish> | ||
<ResourceId>/subscriptions/0ce533cd-476e-4027-a778-ea7f68c9d4d3/resourceGroups/CajunCoding/providers/Microsoft.Web/sites/graphql-star-wars</ResourceId> | ||
<UserName>$graphql-star-wars</UserName> | ||
<_SavePWD>true</_SavePWD> | ||
<IsLinux>true</IsLinux> | ||
<PublishUrl>https://graphql-star-wars.scm.azurewebsites.net/</PublishUrl> | ||
</PropertyGroup> | ||
</Project> |
173 changes: 173 additions & 0 deletions
173
...ons-RepoDB/Properties/ServiceDependencies/graphql-star-wars - Zip Deploy/profile.arm.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"metadata": { | ||
"_dependencyType": "compute.function.linux.appService" | ||
}, | ||
"parameters": { | ||
"resourceGroupName": { | ||
"type": "string", | ||
"defaultValue": "CajunCoding", | ||
"metadata": { | ||
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking." | ||
} | ||
}, | ||
"resourceGroupLocation": { | ||
"type": "string", | ||
"defaultValue": "", | ||
"metadata": { | ||
"description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support." | ||
} | ||
}, | ||
"resourceName": { | ||
"type": "string", | ||
"defaultValue": "graphql-star-wars", | ||
"metadata": { | ||
"description": "Name of the main resource to be created by this template." | ||
} | ||
}, | ||
"resourceLocation": { | ||
"type": "string", | ||
"defaultValue": "[parameters('resourceGroupLocation')]", | ||
"metadata": { | ||
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there." | ||
} | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Resources/resourceGroups", | ||
"name": "[parameters('resourceGroupName')]", | ||
"location": "[parameters('resourceGroupLocation')]", | ||
"apiVersion": "2019-10-01" | ||
}, | ||
{ | ||
"type": "Microsoft.Resources/deployments", | ||
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]", | ||
"resourceGroup": "[parameters('resourceGroupName')]", | ||
"apiVersion": "2019-10-01", | ||
"dependsOn": [ | ||
"[parameters('resourceGroupName')]" | ||
], | ||
"properties": { | ||
"mode": "Incremental", | ||
"expressionEvaluationOptions": { | ||
"scope": "inner" | ||
}, | ||
"parameters": { | ||
"resourceGroupName": { | ||
"value": "[parameters('resourceGroupName')]" | ||
}, | ||
"resourceGroupLocation": { | ||
"value": "[parameters('resourceGroupLocation')]" | ||
}, | ||
"resourceName": { | ||
"value": "[parameters('resourceName')]" | ||
}, | ||
"resourceLocation": { | ||
"value": "[parameters('resourceLocation')]" | ||
} | ||
}, | ||
"template": { | ||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"resourceGroupName": { | ||
"type": "string" | ||
}, | ||
"resourceGroupLocation": { | ||
"type": "string" | ||
}, | ||
"resourceName": { | ||
"type": "string" | ||
}, | ||
"resourceLocation": { | ||
"type": "string" | ||
} | ||
}, | ||
"variables": { | ||
"storage_name": "[toLower(concat('storage', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId))))]", | ||
"appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]", | ||
"storage_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Storage/storageAccounts/', variables('storage_name'))]", | ||
"appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]", | ||
"function_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/sites/', parameters('resourceName'))]" | ||
}, | ||
"resources": [ | ||
{ | ||
"location": "[parameters('resourceLocation')]", | ||
"name": "[parameters('resourceName')]", | ||
"type": "Microsoft.Web/sites", | ||
"apiVersion": "2015-08-01", | ||
"tags": { | ||
"[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty" | ||
}, | ||
"dependsOn": [ | ||
"[variables('appServicePlan_ResourceId')]", | ||
"[variables('storage_ResourceId')]" | ||
], | ||
"kind": "functionapp", | ||
"properties": { | ||
"name": "[parameters('resourceName')]", | ||
"kind": "functionapp", | ||
"httpsOnly": true, | ||
"reserved": false, | ||
"serverFarmId": "[variables('appServicePlan_ResourceId')]", | ||
"siteConfig": { | ||
"alwaysOn": true, | ||
"linuxFxVersion": "dotnet|3.1" | ||
} | ||
}, | ||
"identity": { | ||
"type": "SystemAssigned" | ||
}, | ||
"resources": [ | ||
{ | ||
"name": "appsettings", | ||
"type": "config", | ||
"apiVersion": "2015-08-01", | ||
"dependsOn": [ | ||
"[variables('function_ResourceId')]" | ||
], | ||
"properties": { | ||
"AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storage_name'), ';AccountKey=', listKeys(variables('storage_ResourceId'), '2017-10-01').keys[0].value, ';EndpointSuffix=', 'core.windows.net')]", | ||
"FUNCTIONS_EXTENSION_VERSION": "~3", | ||
"FUNCTIONS_WORKER_RUNTIME": "dotnet" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"location": "[parameters('resourceGroupLocation')]", | ||
"name": "[variables('storage_name')]", | ||
"type": "Microsoft.Storage/storageAccounts", | ||
"apiVersion": "2017-10-01", | ||
"tags": { | ||
"[concat('hidden-related:', concat('/providers/Microsoft.Web/sites/', parameters('resourceName')))]": "empty" | ||
}, | ||
"properties": { | ||
"supportsHttpsTrafficOnly": true | ||
}, | ||
"sku": { | ||
"name": "Standard_LRS" | ||
}, | ||
"kind": "Storage" | ||
}, | ||
{ | ||
"location": "[parameters('resourceGroupLocation')]", | ||
"name": "[variables('appServicePlan_name')]", | ||
"type": "Microsoft.Web/serverFarms", | ||
"apiVersion": "2015-02-01", | ||
"kind": "linux", | ||
"properties": { | ||
"name": "[variables('appServicePlan_name')]", | ||
"sku": "Standard", | ||
"workerSizeId": "0", | ||
"reserved": true | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
70 changes: 70 additions & 0 deletions
70
...ns-RepoDB/Properties/ServiceDependencies/graphql-star-wars - Zip Deploy/storage1.arm.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"resourceGroupName": { | ||
"type": "string", | ||
"defaultValue": "CajunCoding", | ||
"metadata": { | ||
"_parameterType": "resourceGroup", | ||
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking." | ||
} | ||
}, | ||
"resourceGroupLocation": { | ||
"type": "string", | ||
"defaultValue": "centralus", | ||
"metadata": { | ||
"_parameterType": "location", | ||
"description": "Location of the resource group. Resource groups could have different location than resources." | ||
} | ||
}, | ||
"resourceLocation": { | ||
"type": "string", | ||
"defaultValue": "[parameters('resourceGroupLocation')]", | ||
"metadata": { | ||
"_parameterType": "location", | ||
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there." | ||
} | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Resources/resourceGroups", | ||
"name": "[parameters('resourceGroupName')]", | ||
"location": "[parameters('resourceGroupLocation')]", | ||
"apiVersion": "2019-10-01" | ||
}, | ||
{ | ||
"type": "Microsoft.Resources/deployments", | ||
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat('cajuncodingb531', subscription().subscriptionId)))]", | ||
"resourceGroup": "[parameters('resourceGroupName')]", | ||
"apiVersion": "2019-10-01", | ||
"dependsOn": [ | ||
"[parameters('resourceGroupName')]" | ||
], | ||
"properties": { | ||
"mode": "Incremental", | ||
"template": { | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"resources": [ | ||
{ | ||
"sku": { | ||
"name": "Standard_LRS", | ||
"tier": "Standard" | ||
}, | ||
"kind": "Storage", | ||
"name": "cajuncodingb531", | ||
"type": "Microsoft.Storage/storageAccounts", | ||
"location": "[parameters('resourceLocation')]", | ||
"apiVersion": "2017-10-01" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"metadata": { | ||
"_dependencyType": "storage.azure" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...-AzureFunctions-RepoDB/Properties/serviceDependencies.graphql-star-wars - Zip Deploy.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"dependencies": { | ||
"storage1": { | ||
"resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Storage/storageAccounts/cajuncodingb531", | ||
"type": "storage.azure", | ||
"connectionId": "AzureWebJobsStorage" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.